Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


      <h1>Nat Geo Hover Effect</h1>
      <p><a href="" target="blank">National Geographic</a> has this simple & stylish hover state that I wanted to disect. It works well for editorial content because it resembles highlighted text.</p>
      <img src=""/>
"The enterprise started in 1966 when Henriette van Weelde, known locally as the “cat lady,” <a href="" target="blank">began taking in abandoned cats on an old sailing barge she had modified with a cat-friendly interior</a>."


                @import url(",400i,700");

body {
   font-family: Merriweather, serif;
   font-size: 18px;

main {
  width: 70vw;
   height: 100%;
  margin: 20px auto;
  display: flex;
  justify-content: center;

div {
   display: flex;
   margin: auto;
   flex-direction: column;

img {
  width: 80%;
  height: auto;

h1 {
   margin-bottom: 5px;

a, a:link {
  color: black;
  text-decoration: none;
  background-position-y: -0%;
  background-image: linear-gradient( white 50%, gold 50%);
  transition: background 500ms ease;
  background-size: 2px;
  background-size: auto 175%;

a:hover {
  background-position-y: 100%;