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

              
                <!DOCTYPE html>
<html>
    <head>
    <meta charset="utf-8" name="viewport" content="width=device-width, initial-scale = 1">
    <title>CSS Card Flip</title>
    <link href="style.css" type="text/css" rel="stylesheet">
    </head>

    <body>
        <div class="maincontainer">
            <div class="back">
                <h2>Copywriting</h2>
                <p>Introduction to Copywriting’ workshop focuses on the theory and processes of professional copywriting as applied to persuasion, reasoning, and rhetoric. This workshop is best-suited to learning how to write and think about consumer-driven functions.</p>
            </div>
            <div class="front">
                <div class="image">
                <img src="https://i.postimg.cc/nhG8H3X6/copywriting.jpg">
                <h2>Copywriting</h2>
                </div>
            </div>
        </div>
        <div class="maincontainer">
            <div class="back">
                <h2>Content Marketing</h2>
                <p>Introduction to Content Marketing workshop focuses on building content frameworks that are designed for and directed at communication engagement. This interdisciplinary workshop is best-suited to learning visual and written communication strategies.</p>
            </div>
            <div class="front">
                <div class="image">
                <img src="https://i.postimg.cc/ydrv1ZXq/contentmarketing.jpg">
                <h2>Content Marketing</h2>
                </div>
            </div>
        </div>
        <div class="maincontainer">
            <div class="back">
                <h2>Web Writing</h2>
                <p>Introduction to Web-Writing workshop focuses on building creative and systemic digital content through online user experiences that benefit people and robots. This workshop is best-suited to creating content for digital platforms and devices — websites, mobile, game consoles, and virtual reality engines.</p>
            </div>
            <div class="front">
                <div class="image">
                <img src="https://i.postimg.cc/ZqbG0630/webwriting.jpg">
                <h2>Web Writing</h2>
                </div>
            </div>
        </div>        

    </body>
</html>
              
            
!

CSS

              
                .maincontainer
{
    width: 302px;
    height: 299px;
    margin: 10px;
    float: left; /* stack each div horizontally */
}

img
{
   border-radius: 10px;
}

.back h2
{
    position: absolute;
}

.back p
{
    position: absolute;
    top: 50px;
    font-size: 15px;
}

.front h2
{
    position: absolute;
    padding: 10px;
    top: 200px;
    color: #000;
}

/* style the maincontainer class with all child div's of class .front */
.maincontainer > .front
{
    position: absolute;
    transform: perspective(600px) rotateY(0deg);
    
    width: 302px;
    height: 290px;
    
    backface-visibility: hidden; /* cant see the backside elements as theyre turning around */
    transition: transform .5s linear 0s;
}

/* style the maincontainer class with all child div's of class .back */
.maincontainer > .back
{
    position: absolute;
    transform: perspective(600px) rotateY(180deg);
    background: #262626;
    color: #fff;
    width: 302px;
    height: 290px;
    border-radius: 10px;
    padding: 5px;
    backface-visibility: hidden; /* cant see the backside elements as theyre turning around */
    transition: transform .5s linear 0s;
}

.maincontainer:hover > .front
{
    transform: perspective(600px) rotateY(-180deg);
}

.maincontainer:hover > .back
{
    transform: perspective(600px) rotateY(0deg);
}


              
            
!

JS

              
                
              
            
!
999px

Console