Skip to content

Using jQuery, Code Prettify, and CSS3 :target, we can make a button that pops up a nice looking view of the current pages source code.

Notifications You must be signed in to change notification settings

CSS-Tricks/View-Source-Button

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

View-Source-Button (Article / Demo)

The idea that first came to mind was to use CSS3's :target pseudo class. We talked about these a while back while exporting CSS3 tabs. The idea is to have a link that links to the #source-code hash tag. That puts #source-code at the end of the URL, and allows the :target selector to match and apply styling.

About

Using jQuery, Code Prettify, and CSS3 :target, we can make a button that pops up a nice looking view of the current pages source code.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published