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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                 <!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Image Gallery Flex Pannels</title>
    <link rel="stylesheet" href="style.css">
</head>

<body>
    <div class="panels">
        <div class="panel panel1">
            <p>It is the greatest of all mistakes to do nothing because you can only do little — do what you can.</p>
        </div>
        <div class="panel panel2">
            <p>You are doomed to make choices. This is life's greatest paradox.</p>
        </div>
        <div class="panel panel3">
            <p>When we seek to discover the best in others, we somehow bring out the best in ourselves.</p>
        </div>
        <div class="panel panel4">
            <p>Beware of missing chances; otherwise it may be altogether too late some day.</p>
        </div>

        <div class="panel panel5">
            <p>Make the most of yourself for that is all there is of you.</p>

        </div>
    </div>
    <script src="main.js"></script>
</body>

</html>
              
            
!

CSS

              
                 body {
    margin: 0;
}

.panels {
    display: flex;
    flex-flow: row wrap;
    color: #fff;
}

.panel1 {
  background-image: url('https://images.pexels.com/photos/1427879/pexels-photo-1427879.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940');
  background-color:#818d92;
    
}

.panel2 {
  background-image:url('https://images.pexels.com/photos/969679/pexels-photo-969679.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940');
  background-color:#a08794;
}

.panel3 {
  background-image:url('https://images.pexels.com/photos/654/clouds-cloudy-agriculture-farm.jpg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940');
   background-color:#bb7e8c;
   
}

.panel4 {
  background-image:url('https://images.pexels.com/photos/415708/pexels-photo-415708.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940');
  background-color:#c9b6be;  
}

.panel5 {
  background-image:url('https://images.pexels.com/photos/906024/pexels-photo-906024.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940');
  background-color:#fbacbe;  
}

.panel {
    flex: 1;
    height: 100vh;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    text-shadow: 2px 2px 4px violet;
    transition: ease;
    display: flex;
    align-items: flex-end;
  border:1px solid #b9d2b1;
}

p {
    text-align: center;
    font-size: 45px;
    font-weight: bold;
    display: none;

}

.panel:hover {
    flex: 5;
}

.panel:hover p {
    display: block;
    background-color: rgba(172, 6, 34, 0.7);
    padding: 30px 10px;
    margin-bottom: 0;
}
              
            
!

JS

              
                 
              
            
!
999px

Console