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

              
                .container
      .row.justify-content-center
         .col.sm-12.col-md-8.col-lg-5
            .rotate-container
               .card.card-front.text-center
                  .card-header
                     p About You
                  .card-background
                  .card-block
                     img(src="https://userstock.io/data/wp-content/uploads/2017/09/bewakoof-com-official-245573-939x1024.jpg" alt="Avatar").avatar 
                     h3.card-title Your Name
                     p Your Profession
                     button.btn.btn-primary.btn-rotate Read more &nbsp;       

                        i.fa.fa-long-arrow-right

               .card.card-back.text-center
                  .card-header
                     p More About You
                  .card-block
                     h4 Interests
                     p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas a faucibus diam. Praesent consectetur, nisl ut semper imperdiet, tortor metus ultrices lorem, non luctus massa risus at urna.
                     h4 Connect:
                     ul.social-links.list-unstyled.d-flex.justify-content-center
                        li
                           a(href="#" target="_blank")
                              i.fa.fa-facebook
                        li
                           a(href="#" target="_blank")
                                 i.fa.fa-twitter
                        li
                           a(href="#" target="_blank")
                              i.fa.fa-snapchat
                        li
                           a(href="#" target="_blank")
                              i.fa.fa-instagram

                     button.btn.btn-primary.btn-rotate    
                        i.fa.fa-long-arrow-left 
                        | &nbsp; Back 
                     
                     
                  
              
            
!

CSS

              
                /* Card styles for rotation */
.rotate-container
     position: relative
     // Height: 25em // Height can ensure height consitency between front and back cards
     .card-front
          width: 100%
          height: 100%
          transform: perspective(600px) rotateY(0deg)
          backface-visibility: hidden
          transition: all .5s linear 0s

     .card-back
          @extend .card-front
          transform: perspective(1600px) rotateY(180deg)
          position: absolute
          top: 0
          left: 0
          right: 0

     .rotate-card-front
          transform: perspective(1600px) rotateY(-180deg)

     .rotate-card-back
          transform: perspective(1600px) rotateY(0deg)

/* Modified card styles */
.card
     box-shadow: 0 8px 6px -6px rgba(0, 0, 0, 0.5)

     .card-header
          p
               margin: 0

     .card-background
          background: url('https://static.pexels.com/photos/443374/pexels-photo-443374.jpeg')
          height: 8em
          background-position: center center
          background-size: cover
      
     // Absolute positioning can be used if negative margins are not preffered.
     .avatar
          max-width: 6em
          max-height: 6em
          margin-top: -4em
          margin-bottom: 1em
          border: 4px solid white
          border-radius: 50%
          background: radial-gradient(#e3e3e3, #329A7C, #109381)

     .btn
          margin-bottom: 1em
          cursor: pointer
      
     .social-links
          li
               margin: .5em
          a
               font-size: 1.5em
         
              
            
!

JS

              
                $(function() {
  // For card rotation
     $('.btn-rotate').click(function(){
          $('.card-front').toggleClass(' rotate-card-front');
          $('.card-back').toggleClass(' rotate-card-back');
     });
  });
              
            
!
999px

Console