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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <head>
  <link rel="stylesheet" href="path/to/font-awesome/css/font-awesome.min.css">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  <link href="https://fonts.googleapis.com/css?family=Droid+Sans+Mono|EB+Garamond|Nunito+Sans|Righteous|Yellowtail" rel="stylesheet"> 
  </head>
</head>
<body>
  <div class = "jumbotron animated fadeIn">
     <div class= "text-container text-center">
  <h1><strong>Quotes for the Soul</strong></h1>
       <br>
       <div id = "soul-box" class= "col-xs-12 row quoteText">
         <q>Empty your mind, be formless. Shapeless, like water. If you put water into a cup, it becomes the cup. You put water into a bottle and it becomes the bottle. You put it in a teapot, it becomes the teapot. Now, water can flow or it can crash. Be water, my friend.</q> <p class="text-right"> ― Bruce Lee</p>
       </div> 
       <div class="col-md-4> 
                   <div class = "text-center">
       <a class="btn btn-primary btn-lg" id="next" role="button"><i class="fa fa-arrow-right" aria-hidden="true"></i>
</a><br>   
     <br>                                                                                                           </div>                                                              
      <div class="col-md-4> 
         <div class = "text-center">
       <a id="social" href="https://twitter.com/intent/tweet" target="_blank" class="btn btn-info btn-sm" role="button"><i class="fa fa-twitter-square" aria-hidden="true"></i></a>
           <a id="social" href="https://www.facebook.com/sharer/sharer.php?u=" target="_blank" class="btn btn-info btn-sm" role="button"><i class="fa fa-facebook-square" aria-hidden="true"></i></a>
           <a id="social" href="https://plus.google.com/share?url=" target="_blank" class="btn btn-info btn-sm" role="button"><i class="fa fa-google-plus-square" aria-hidden="true"></i>
</a>
           </div>
         </div>
         </div> 
      </div>
  </div>
<div class="panel-footer text-center"> <p>Created by: Paulina Fischer</p><p>Library from 
<a href="https://www.youtube.com/channel/UCLG_lIjyLPqjN-KtHK_aE-Q" target="_blank">Happy Coder</a> and freeCodeCamp.</p></div>
</body>

              
            
!

CSS

              
                .jumbotron{
  background-image: url("http://res.cloudinary.com/dfqxzvppi/image/upload/v1497265138/bruce-lee-flying_sxqij8.jpg");
  background-size: cover;
  overflow: hidden;
 z-index: -1;
  position:realative;
  width:100%;
  heigth:auto;
} 
.text-container {
  position: relative;
 background-color: rgba(0, 0, 0, 0.8);
  color:#F5F5F5;
}
h3 {
  color:#D3D3D3;
}
h1{
  color:#DCDCDC;
  font-family: 'EB Garamond', serif;
}
#soul-box {
  position: relative;
 background-color: rgba(0, 0, 0, 0.8);
  color:#F5F5F5;
  width: 80%;
  left: 12%; 
  color:#F5F5F5;
  font-size:20px;
}
#next{
  background-color:black;
  color:grey;
  border-color: grey;
  cursor:pointer;
}
#social {
  background-color:black;
  color:grey;
  border: none;
  position: relative;
  cursor:pointer;
}

              
            
!

JS

              
                $("#next").on('click', function() {
   
    $.ajaxSetup({cache:false});
$.getJSON("https://api.kanye.rest", function (data) {
            document.getElementById("soul-box").innerHTML = data.quote;
  fetch('https://source.unsplash.com/random/1300x400').then(response => response.blob()) .then(URL.createObjectURL) .then(url => $('.jumbotron').css('background-image', `url(${url})`));
});
  });
              
            
!
999px

Console