cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <svg style="position: absolute; width: 0; height: 0;" width="0" height="0">
    <symbol id="heart" viewBox="0 0 1024 1024" fill="hotpink">
        <title>heart</title>
        <path class="path1" d="M755.188 64c-107.63 0-200.258 87.554-243.164 179-42.938-91.444-135.578-179-243.216-179-148.382 0-268.808 120.44-268.808 268.832 0 301.846 304.5 380.994 512.022 679.418 196.154-296.576 511.978-387.206 511.978-679.418 0-148.392-120.43-268.832-268.812-268.832z"></path>
    </symbol>
  <symbol id="heart-2" viewBox="0 0 1024 1024" fill="white">
        <title>heart-2</title>
        <path class="path1" d="M755.188 64c-107.63 0-200.258 87.554-243.164 179-42.938-91.444-135.578-179-243.216-179-148.382 0-268.808 120.44-268.808 268.832 0 301.846 304.5 380.994 512.022 679.418 196.154-296.576 511.978-387.206 511.978-679.418 0-148.392-120.43-268.832-268.812-268.832z"></path>
    </symbol>
</svg>


<!-- HTML Card Structure-->
<div class="card card-back">
    <div class="center">
        <svg class="heart-2">
            <use xlink:href="#heart-2"></use>
        </svg>
    </div>
</div>
<div class="card card-front">
    <div class="row">
        <!-- this will be for the small pip in the top left corner with the number of the card -->
        <div class="number cell col-1">7
            <svg class="heart">
                <use xlink:href="#heart"></use>
            </svg>
        </div>
        <!-- then 7 more pips for the body of the card -->
        <div class="cell col-2">
            <svg class="heart">
                <use xlink:href="#heart"></use>
            </svg>
        </div>
        <div class="cell col-2 offset-2">
            <svg class="heart">
                <use xlink:href="#heart"></use>
            </svg>
        </div>

        <div class="cell col-8">
            <svg class="heart">
                <use xlink:href="#heart"></use>
            </svg>
        </div>
        <div class="cell col-2 offset-1">
            <svg class="heart">
                <use xlink:href="#heart"></use>
            </svg>
        </div>
        <div class="cell col-2 offset-2">
            <svg class="heart">
                <use xlink:href="#heart"></use>
            </svg>
        </div>
        <div class="cell col-2 offset-1">
            <svg class="heart rotate">
                <use xlink:href="#heart"></use>
            </svg>
        </div>
        <div class="cell col-2 offset-2">
            <svg class="heart rotate">
                <use xlink:href="#heart"></use>
            </svg>
        </div>
        <!-- Then the number and pip for the bottom right...upside down -->
        <div class="rotate number cell col-1">7
            <svg class="heart">
                <use xlink:href="#heart"></use>
            </svg>
        </div>
    </div>
</div>

            
          
!
            
                  $card-width: 20vw;
    $card-height: $card-width*1.4;
    $font-size-number: $card-width * 0.1;
    $icon-size: $card-width / 5;
    $color-1: hotpink;
    $color-2: pink;
    $color-3: plum;
    $color-4: purple;
    $color-5: deep-pink;
    $color-6: black;
    $color-7: white;
    *,
    *:before,
    *:after {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }

    .heart {
        width: $icon-size;
        height: $icon-size;
    }
    
    .number {
        text-align: center;
        font-size: $font-size-number;
        color: $color-1;
    }

    .number {
        .heart {
            width: $icon-size * .5;
            height: $icon-size *.5;
        }
    }
    
    .rotate {
        transform: rotate(180deg);
    }
    
    .row {
        display: flex;
        flex-flow: row wrap;
        align-content: space-between;
        height: 100%;
        align-items: center;
    }
    
    .cell {
        flex: 1;
        text-align: center;
    }
    
    .col-1 {
        flex: 0 0 12.5%;
    }
    
    .col-2 {
        flex: 0 0 25%;
    }
    
    .col-8 {
        flex: 0 0 100%;
    }
    
    .offset-1 {
        margin-left: 12.5%;
    }
    
    .offset-2 {
        margin-left: 25%;
    }
    .card {
        width: $card-width;
        height: $card-height;
        border: 1px solid $color-6;
        border-radius: 9px;
        box-shadow: 9px 9px 9px #888888;
    }
    .card-front {
        background-color: $color-7;
        padding: 15px;
        margin: 20px;
        display: flex;
        transition: width 4s;
    }
    .card-front:hover {
       width: $card-width*1.2;
       height: $card-height*1.2;
    }
    .card-back {
        padding: 15px;
        margin: 20px;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: $color-1;
        animation-name: background;
        animation-duration: 16s;
        animation-timing-function: ease;
        animation-delay: 4s;
        animation-iteration-count: infinite;
    }
    @keyframes background {
    0%   {background-color: $color-5;}
    25%  {background-color: $color-3;}
    50%  {background-color: $color-2;}
    75%  {background-color: $color-1;}
    100% {background-color: $color-4;}
    }
    
    .card-back:hover {
      display: none;
    }
    
            
          
!
999px
Loading ..................

Console