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

              
                <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Fade effect</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    
    <div class="home">
        <div class="bloc-fade">
            <h1>DEEP BREATH</h1>
            <p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Consequuntur deserunt explicabo sapiente ad nulla sed, enim libero. Expedita vero, tempora dolor natus praesentium fugiat facere tempore aspernatur ducimus, quibusdam officia labore, culpa dicta consequuntur reprehenderit qui vitae tenetur itaque consequatur temporibus non exercitationem nulla suscipit sint? Nesciunt ab amet voluptate? Natus voluptas, deserunt cum optio quas possimus eligendi nihil enim adipisci? Tenetur, rem exercitationem quasi expedita dolorem, aut sunt esse consectetur ut laboriosam dolores itaque odio accusantium eos necessitatibus hic temporibus animi. Magnam, placeat rem dignissimos ipsam laborum libero excepturi, asperiores eveniet incidunt praesentium illo voluptatum molestiae, laudantium eligendi voluptas. Excepturi, obcaecati enim accusantium eaque aliquid explicabo sunt quod consequuntur iure, expedita beatae illo repudiandae laudantium qui quaerat suscipit voluptatibus! Perferendis dolor beatae, quas iure earum excepturi minus repellendus natus, libero quam suscipit fuga corporis distinctio soluta vitae fugiat voluptate laborum repellat voluptatibus aliquid magnam impedit magni? Quas enim libero dolores dolorum aut recusandae sint mollitia non facilis magnam. Nesciunt accusantium rerum, debitis officia optio dolor illo aperiam quae incidunt, quidem provident! Ipsum eius amet ea nulla incidunt. Rerum iure eos tenetur sapiente harum repudiandae, animi quo voluptatum, labore quasi consequatur. Consequuntur fugit quo assumenda quae. Minus labore veritatis reiciendis?</p>
            <br>
            <p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Cumque, possimus tenetur dolor fugiat dignissimos similique veniam sapiente architecto excepturi natus porro, nobis doloremque distinctio, eveniet eos voluptatibus! Saepe, eveniet vero praesentium facilis neque doloribus labore?</p>
        </div>
        <div class="bloc-background"></div>
    </div>
</body>
</html>
              
            
!

CSS

              
                *, ::before, ::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    height: 100vh;
    color: #2a3d4e;
}
.home {
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
}
.bloc-fade{
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    flex-direction: column;
    width: 800px;
    height: 100%;
    background: #fff;
    box-shadow: 100px 0 100px 100px  #fff;
}
.bloc-background {
    background-image: url("https://cdn.dribbble.com/users/1803663/screenshots/10002691/media/67450df1b3b91525836dc741b74a6aa1.png");
    background-repeat: no-repeat;
    flex-grow: 1;
    height: 100%;
}

h1 {
    text-align: center;
    font-size: 70px;
    padding: 100px 0 50px 0;
}

.bloc-fade p {
    width: 70%;
    font-size: 18px;
    text-align: justify;
}


              
            
!

JS

              
                
              
            
!
999px

Console