Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

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

Packages

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.

Behavior

Save Automatically?

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.

HTML

              
                <div class="wrapper">
  <p>My father had a small estate in <a href="#">default link</a> Nottinghamshire: I was the third of five sons. He sent me to Emanuel College in Cambridge at fourteen years old, where I resided three years, and applied myself close to my studies; but the charge of <a href="#" class="fade_in_bg">maintaining</a> me, although I had a very scanty allowance, being <a href="#" class="fade_in_bg">too great</a> for a narrow fortune, I was bound apprentice to Mr. James Bates, an eminent surgeon in London, with whom I continued four years. </p>
  <p>My father now and then sending me small sums of money, I laid them out in learning navigation, and <a href="#" data-linktext="other parts" class="slide_from_left">other parts</a> of the mathematics, useful to those who intend to travel, as I always believed it would be, some time or other, <a href="#" data-linktext="my fortune" class="slide_from_right">my fortune</a> to do. When I left Mr. Bates, I went down to my father: where, by the assistance of him and my uncle John, and some other relations, I got forty pounds, and a promise of thirty pounds a year to maintain me at Leyden: there I studied physic two years and seven months, knowing it would be useful in long voyages.</p>
  <p>Soon after my return <a href="#" data-linktext="from Leyden" class="slide_from_top">from Leyden</a>, I was recommended by my good master, Mr. Bates, to be surgeon to the Swallow, Captain Abraham Pannel, commander; with whom I continued three years and a half, making a voyage or two into the Levant, <a href="#" data-linktext="and some other" class="slide_from_bottom">and some other</a> parts. When I came back I resolved to settle in London; to which Mr. Bates, my master, encouraged me, and by him I was recommended to several patients. I took part of a small house in the Old Jewry; and being advised to alter my condition, I married Mrs. Mary Burton, second daughter to Mr. Edmund Burton, hosier, in Newgate-street, with whom I received four hundred pounds for a portion.</p>
  <p>But my good master Bates dying in <a href="#" class="fade_in_underline">two years</a> after, and I having few friends, my business began to fail; for my conscience would not suffer me to imitate the bad practice of too many among my brethren. Having <a href="#" class="underline_from_left">therefore consulted</a> with my wife, and some of my acquaintance, I determined to go again to sea. I was surgeon successively in two ships, and made several voyages, for six years, to the East and West Indies, by which I <a href="#" class="underline_from_right">got some addition</a> to my fortune. My hours of <a href="#" class="underline_from_center">leisure I spent</a> in reading the best authors, ancient and modern, being always provided with a good number of books; and when I was ashore, in observing the manners and dispositions of the people, as well as learning their language; wherein I had a great facility, by the strength of my memory.</p>
</div>
              
            
!

CSS

              
                body {
  font-family: "Open Sans";
  font-size: 1.125rem;
  line-height: 1.618em;
  color: #454545;
}
.wrapper {
  max-width: 50rem;
  width: 100%;
  margin: 2rem auto;
}
a {
  color: #3498db;
}
a.fade_in_bg {
  text-decoration: none;
  padding-left: 0.25em;
  padding-right: 0.25em;
  padding-bottom: 0.05em;
  border-bottom: 0.0625em dotted #3498db;
  transition: all 0.35s;
}
a.fade_in_bg:hover {
  background: #3498db;
  color: #fff;
  transition: all 0.35s;
}
a[class^="slide"] {
  text-decoration: none;
  line-height: 1.5em;
  padding-left: 0.25em;
  padding-right: 0.25em;
  border-bottom: 0.0625em dotted #3498db;
  position: relative;
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
a[class^="slide"]::after {
  content: attr(data-linktext);
  background: #3498db;
  color: #fff;
  position: absolute;
  display: block;
  text-align: center;
  transition: all 0.35s;
}
a[class^="slide"]:hover {
  border-bottom: 0.0625em solid #3498db;
}
a[class^="slide"]:hover::after {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  transition: all 0.35s;
}
a.slide_from_left::after {
  top: 0;
  right: 100%;
  left: -100%;
}
a.slide_from_right::after {
  top: 0;
  right: -100%;
  left: 100%;
}
a.slide_from_top::after {
  top: -100%;
  bottom: 100%;
}
a.slide_from_bottom::after {
  top: 100%;
  bottom: -100%;
}
a.fade_in_underline {
  text-decoration: none;
  padding-left: 0.125em;
  padding-right: 0.125em;
  padding-bottom: 0.05em;
  border-bottom: 0.125em solid #fff;
  transition: all 0.35s;
}
a.fade_in_underline:hover {
  border-bottom: 0.125em solid #3498db;
  transition: all 0.35s;
}
a[class^='underline'] {
  text-decoration: none;
  padding-left: 0.125em;
  padding-right: 0.125em;
  padding-bottom: 0.05em;
  position: relative;
}
a[class^='underline']::after {
  content: '';
  position: absolute;
  top: 100%;
  border-bottom: 0.125em solid #3498db;
  transition: all 0.35s;
}
a[class^='underline']:hover::after {
  transition: all 0.35s;
}
a.underline_from_left::after {
  left: 0;
  right: 100%;
}
a.underline_from_left:hover::after {
  right: 0;
}
a.underline_from_right::after {
  right: 0;
  left: 100%;
}
a.underline_from_right:hover::after {
  left: 0;
}
a.underline_from_center::after {
  right: 50%;
  left: 50%;
}
a.underline_from_center:hover::after {
  right: 0;
  left: 0;
}
              
            
!

JS

              
                
              
            
!
999px

Console