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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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.

            
              <div class="vday">
  <div class="block  block01">
    <div class="pulseHeart"></div>
    <p class="block--text">books <span class="block--text__for">to</span><span class="block--text__forWho">love</span></p>
    <div class="vday--line"></div>
    <a href="/en-ca/gifts/for-her/" class="cta  cta__white">shop<img src="http://static.indigoimages.ca/2015/shop/112323_fall_img20_ctaWhite.png" alt="arrow" class="cta--arrow__white"></a>
  </div><!-- end a block -->
</div>
            
          
!
            
              html, body {
  height: 100%;
}

.vday {
  background-color: white;
  background: linear-gradient(white 44px, black 20px);
  background-size: 100% 64px;
  background-repeat: repeat-y;
  height: 100%;
  text-align: center;
}

.vday .block {
  width: 314px;
  height: 405px;
  border: 15px inset;
  border-top: lightgrey inset 15px;
  border-bottom: rgb(222,222,222) inset 15px;
  display: inline-block;
  text-align: center;
  padding: 20px 25px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background-color: white;
  background: linear-gradient(white 44px, black 20px);
  background-size: 100% 64px;
  background-repeat: repeat-y;
  top: 50%;
  transform: translateY(-50%);
}

.pulseHeart {
  position: relative;
  margin: 0 auto;
  top: 85px;
  transform-origin: 50% 150%;
  -webkit-animation: heartbeat 1300ms ease 0s infinite normal;
  animation: heartbeat 1300ms ease 0s infinite normal;
}

.pulseHeart:before,
.pulseHeart:after {
  position: absolute;
  content: "";
  left: 151.32px;
  width: 151.32px;
  height: 247.487px;
  background: #CC2022;
  -moz-border-radius: 247.487px 247.487px 0 0;
  border-radius: 247.487px 247.487px 0 0;
  -webkit-transform: rotate(-45deg);
  -ms-transform: rotate(-45deg);
  transform: rotate(-45deg);
  -webkit-transform-origin: 0 100%;
  -ms-transform-origin: 0 100%;
  transform-origin: 0 100%;
}

.pulseHeart:after {
  left: 0;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  transform: rotate(45deg);
  -webkit-transform-origin: 100% 100%;
  -ms-transform-origin: 100% 100%;
  transform-origin: 100% 100%;
}

.vday p.block--text {
  color: white;
  font-family: "Miller Display Semibold";
  text-transform: lowercase;
  letter-spacing: 0.06em;
  display: inline-block;
  font-size: 56px;
  position: relative;
  top: 105px;
  max-width: 250px;
  left: -15px;
  line-height: 38px;
  margin: 40px auto 0;
}

.vday .block--text__for {
  text-transform: uppercase;
  font-size: 19px;
  letter-spacing: 0.125em;
  padding-left: 70px;
}

.vday .block--text__forWho {
  font-size: 29px;
  letter-spacing: 0.125em;
  text-transform: uppercase;
  padding-left: 6px;
}

.vday .cta {
  position: absolute;
  left: calc(50% - 27px);
  top: 275px;
  font-family: 'Gibson Regular';
  color: black;
  letter-spacing: 0.1em;
  line-height: inherit;
  text-transform: uppercase;
  display: inline-block;
  font-size: 16px;
  text-decoration: none;
  : none;
}

.vday a:hover,
.vday a:focus,
.vday a:active {
  text-decoration: none;
}

.vday .cta--arrow,
.vday .cta--arrow__white {
  margin-left: 5px;
}


/* TYPE STYLES WHITE ON RED */

.vday .cta__white,
a.cta__white:hover,
a.cta__white:focus,
a.cta__white:active {
  color: white;
}

.vday--line {
  width: 85px;
  border-bottom: 1px solid white;
  display: block;
  position: absolute;
  left: 135px;
  top: 255px;
}

@keyframes heartbeat {
  0% {
    -moz-transform: scale(1);
    -ms-transform: scale(1);
    -webkit-transform: scale(1);
    transform: scale(1);
  }
  14% {
    -moz-transform: scale(1.05);
    -ms-transform: scale(1.05);
    -webkit-transform: scale(1.05);
    transform: scale(1.05);
  }
  28% {
    -moz-transform: scale(1);
    -ms-transform: scale(1);
    -webkit-transform: scale(1);
    transform: scale(1);
  }
  42% {
    -moz-transform: scale(1.12);
    -ms-transform: scale(1.12);
    -webkit-transform: scale(1.12);
    transform: scale(1.12);
  }
  70% {
    -moz-transform: scale(1);
    -ms-transform: scale(1);
    -webkit-transform: scale(1);
    transform: scale(1);
  }
}


/*  ==========================
LISA REMEMBER U FIGURED THIS OUT:
When making a CSS heart to be a certain size (like you need it to be 245px wide as in this case) measure with a square to find the sides of a square that will fit in each dimension and then get the width/left position and height/border-radius for the two divs that make each half of the heart. Mutiply the length of one side by the square root of 2 to get the values to use. So here:

width/left position :
square root of 2 times 107 = 151.320851174

height/border-radius:
square root of 2 times 175 = 247.487373415	

===============================*/
            
          
!
999px
Loading ..................

Console