Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <div id="content">
  <section id="first">
    <blockquote>
      <q>All men are equal before fish.</q>
      <cite>Herbert Hoover</cite>
    </blockquote>
    <div class="img-container">
      <div class="img-mask stright-mask">
        <img src="https://www.oldbookillustrations.com/wp-content/high-res/1836-1849/orbicular-batfish-1600.jpg">
      </div>
      <div class="img-mask inverse-mask">
        <img class="inverse" src="https://www.oldbookillustrations.com/wp-content/high-res/1836-1849/orbicular-batfish-1600.jpg" />
      </div>
    </div>
  </section>
  <section id="second">
    <div>
      <p>A fish is any member of a group of organisms that consist of all gill-bearing aquatic craniate animals that lack limbs with digits. They form a sister group to the tunicates, together forming the olfactores. Included in this definition are the living
        hagfish, lampreys, and cartilaginous and bony fish as well as various extinct related groups. Tetrapods emerged within lobe-finned fishes, so cladistically they are fish as well. However, traditionally fish are rendered obsolete or <strong>paraphyletic</strong>        by excluding the tetrapods (i.e., the amphibians, reptiles, birds and mammals which all descended from within the same ancestry). Because in this manner the term "fish" is defined negatively as a paraphyletic group, it is not considered a formal
        taxonomic grouping in systematic biology. The traditional term pisces (also ichthyes) is considered a typological, but not a phylogenetic classification. The earliest organisms that can be classified as fish were soft-bodied chordates that first
        appeared during the Cambrian period. Although they lacked a true spine, they possessed notochords which allowed them to be more agile than their invertebrate counterparts. Fish would continue to evolve through the Paleozoic era, diversifying into
        a wide variety of forms. Many fish of the Paleozoic developed external armor that protected them from predators. The first fish with jaws appeared in the Silurian period, after which many (such as sharks) became formidable marine predators rather
        than just the prey of arthropods. Most fish are ectothermic ("cold-blooded"), allowing their body temperatures to vary as ambient temperatures change, though some of the large active swimmers like white shark and tuna can hold a higher core temperature.
        Fish are abundant in most bodies of water. They can be found in nearly all aquatic environments, from high mountain streams (e.g., char and gudgeon) to the abyssal and even hadal depths of the deepest oceans (e.g., gulpers and anglerfish). With
        33,100 described species, fish exhibit greater species diversity than any other group of vertebrates. Fish are an important resource for humans worldwide, especially as food. Commercial and subsistence fishers hunt fish in wild fisheries (see
        fishing) or farm them in ponds or in cages in the ocean (see aquaculture). They are also caught by recreational fishers, kept as pets, raised by fishkeepers, and exhibited in public aquaria. Fish have had a role in culture through the ages, serving
        as deities, religious symbols, and as the subjects of art, books and movies.</p>
    </div>
    <img class="inverse" src="https://www.oldbookillustrations.com/wp-content/high-res/1836-1849/scaly-dragonfish-864.jpg" />
  </section>
</div>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Muli:400,400i,700,700i|Ovo');
html,
body {
  padding: 0;
  margin: 0;
  font-family: 'Ovo', serif;
  font-size: 16px;
  overflow-x: hidden;
  line-height: 1.3em;
}

#content {
  max-width: 1000px;
  margin: 0 auto;
}

strong {
  color: #28bfb5;
}

section {
  position: relative;
}

.img-container {
  position: relative;
  height: 160vh;
  top: 10vh;
}

img {
  max-width: 100%;
}

.img-mask {
  overflow: hidden;
  width: 100%;
  position: absolute;
}

.stright-mask {
  top: 0;
  height: 55%;
}

.inverse-mask {
  background: rgb(26, 26, 26);
  bottom: 0;
  height: 45%;
}

.stright-mask img {
  position: relative;
  top: 100%;
  transform: translateY(-55%);
}

.inverse-mask img {
  object-position: bottom;
  transform: translateY(-55%);
}

.inverse {
  -webkit-filter: invert(0.9);
  filter: invert(0.9);
}

blockquote {
  color: #28bfb5;
  position: absolute;
  top: 0;
  z-index: 1;
  line-height: normal;
}

q {
  font-family: 'Ovo', serif;
  font-size: 50px;
}

cite {
  font-style: normal;
  opacity: 0.6;
  display: block;
  font-size: 20px;
  font-family: 'Muli', sans-serif;
}

cite:before {
  content: "";
  background: #28bfb5;
  width: 15px;
  height: 2px;
  display: inline-block;
  margin-right: 7px;
}

q:before,
q:after {
  display: none;
}

#second {
  background: rgb(26, 26, 26);
}

#second p {
  color: #ddd;
  width: 85%;
  margin: 0 auto;
  text-align: justify;
  position: relative;
  z-index: 1;
}

#second p:first-child:first-letter {
  font-size: 100px;
  float: left;
  line-height: 80px;
  padding-right: 10px;
  color: #28bfb5;
}

#second p:before,
#second p:after {
  content: "";
  display: block;
  background: #444;
  width: 4px;
  height: 4px;
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 5px
}

#second p:after {
  top: auto;
  bottom: -20px;
}

#second div {
  position: relative;
  margin-top: 30px;
}

#second div:before {
  opacity: 0.4;
  content: "";
  width: 300px;
  height: 300px;
  background: #28bfb5;
  background: -webkit-radial-gradient(circle, #28bfb5 60%, transparent 60%);
  display: block;
  position: absolute;
  bottom: -80px;
  right: -80px;
  z-index: 0;
}

#second .inverse {
  display: block;
  width: 400px;
  height: auto;
  position: static;
  margin: 0 auto;
  object-fit: contain;
  padding: 40px 0;
}

#second:before {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background: #555;
  position: absolute;
  bottom: 160px;
}

@media (min-width: 768px) {
  
  q {
    font-size: 100px;
  }

  #second p {
    -webkit-column-count: 2;
    -moz-column-count: 2;
    column-count: 2;
    -webkit-column-gap: 50px;
    -moz-column-gap: 50px;
    column-gap: 50px;
    -webkit-column-rule: 1px solid #666;
    -moz-column-rule: 1px solid #666;
    column-rule: 1px solid #666;
    width: 90%;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console