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

              
                
  <a href="#title"><img src="https://cdn4.iconfinder.com/data/icons/iphone-calculator-shopping-report/128/up.png" class="up"></a>
<div id="main">
  <header> 
    <h1 id="title"> The animal : Dog </h1> 
    <p> The best friend to human </p>
  </header>
  <div id="img-div"> 
    <figure>
    <img id ="image" src="https://images.pexels.com/photos/356378/pexels-photo-356378.jpeg?auto=compress&cs=tinysrgb&h=650&w=940" alt="a white dog">
      <figcaption id="img-caption"> A Pomeranian dog</figcaption>
    </figure>
    <figure>
    <img src="https://cdn6.littlethings.com/app/uploads/2017/05/cute-dog-yorkie-600x600.jpg" alt="a cute dog" id="image">
      <figcaption> A Yorkie dog</figcaption>
    </figure>
    <figure>
    <img src="https://cdn.akc.org/content/article-body-image/papillonsmalldogs.jpg" alt="cute" id="image">
      <figcaption> A papillon dog</figcaption>
    </figure>
  </div>
  <main id="tribute-info"> 
  <img src="https://dynaimage.cdn.cnn.com/cnn/q_auto,w_1349,c_fill,g_auto,h_759,ar_16:9/http%3A%2F%2Fcdn.cnn.com%2Fcnnnext%2Fdam%2Fassets%2F180316113418-travel-with-a-dog-3.jpg" alt="main-picture">
    <h2> The life of Dogs </h2>
    <ul>
    <li>The dog is one of the most popular pets in the world. It ordinarily remains loyal to a considerate master, and because of this the dog has been called man's best friend. Class distinctions between people have no part in a dog's life. It can be a faithful companion to either rich or poor.</li>

<li> Dogs have been domesticated for most of human history and have thus endeared themselves to many over the years. Stories have been told about brave dogs that served admirably in war or that risked their lives to save persons in danger. When Pompeii--the Roman community destroyed by Mount Vesuvius in AD 79--was finally excavated, searchers found evidence of a dog lying across a child, apparently trying to protect the youngster. Perhaps few of the millions of dogs in the world may be so heroic, but they are still a source of genuine delight to their owners.</li>
      <li> A dog fits easily into family life. It thrives on praise and affection. When a master tells a dog that it is good, the animal happily wags its tail. But when a master scolds a dog, it skulks away with a sheepish look and with its tail tucked between its legs.</li>
      <li> People in the city as well as those in other areas can enjoy a dog. Medium-size or small dogs are best suited for the confines of the city. Large dogs need considerable exercise over a large area. </li>
      <li> Dogs are not always well thought of, however. In recent years dogs in the city have been in the center of controversy. Some people have criticized dog owners for allowing their pets to soil sidewalks and lawns, although in some cities laws oblige owners to walk their dogs along street curbs. In turn, dog owners have argued that the animals serve as protection against vandals and burglars and thus protect their detractors as well as their owners.</li>
    </ul>
    <a href="http://www.lookd.com/dogs/index.html" target="_blank" id="tribute-link"><button><strong><span>MORE</span></strong></button></a>
  </main>
</div>
              
            
!

CSS

              
                body {
  padding: 0px;
  margin: 0px;
  font-family: "Helvetica";
  background: linear-gradient(to right, #f64f59, #c471ed, #12c2e9);
}
#main {
  display: grid;
  grid-template-rows: 100px 300px 1fr;
  grid-template-areas:
    "header"
    "picture"
    "main";
  justify-items: center;
  grid-row-gap: 56px;
}
header {
  background: linear-gradient(to right, #1cefff, #c0c0aa);
  text-align: center;
  grid-area: header;
  width: 90%;
  height: 150%;
  margin-top: 10px;
  border: 1px solid darkorange; 
}
h1 {
  font-size: 40px;
  color: white;
}
#image {
  border-radius: 50%;
  border: 1px solid darkorange;
  height: 180px;
  width: 180px;
  float: left;
  margin-left: 60px;
}
#img-div {
  position: relative;
  width: 90%;
  height: 350px;
  grid-area: picture;
  padding-top: 100px;
}

figure {
  display: inline-block;
  border: 1px dotted gray;
  width: 300px;
  vertical-align:top;
   transition-duration: 2s;
  position: relative;
  opacity: 0.5;
}
figure:hover {
    opacity: 1;
    transform: translate(0px, -100px);
}
figcaption {
  border: 1px solid green;
  height: 30px;
  display: block;
  clear: both;
  text-align: center;
}
main img {
  margin-top: 30px;
  width: 80%;
  height: 50%;
  position: relative;
  left: 130px;
}
h2 {
  text-align: center;
}
main {
  background: linear-gradient(to right,#1cefff, #c0c0aa);
  grid-area: main;
  border: 2px solid darkorange;
  height: 1200px;
  width: 90%;
}
button {
  background-color: #99b433;
  border: none;
  width: 150px;
  height: 50px;
  position: relative;
  left: 550px;
  color: white;
  font-size: 16px;
  transition: 1s;
  opacity: 0.5;
}
a {
  width: 100%;
}
button:hover {
  cursor: pointer;
  background-color: #00a300;
  opacity: 1;
  box-shadow: 19px 10px 5px 0px rgba(0,0,0,0.75);
}
button:active {
  background-color: #1e7145;
}

.up {
  width: 50px;
  position: fixed;
  opacity: 0.5;
  transition: 1s;
  top: 200px;
  float: left;
  cursor: pointer;
}
.up:hover {
  opacity: 1;
}
li {
 margin: 0 0 20px 0;
}
              
            
!

JS

              
                
              
            
!
999px

Console