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.

            
              <!DOCTYPE html>
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet">
<meta name="viewport" content="width=device-width" />

<style>


#showlabels:checked ~ form input {
  display:inline-block;
}

input{
  display:none;
}

.labeltoggle{
  width:30px;
  height:30px;
  display:block;
  float:right;
  padding:10px;
  text-align:center;
  font-size:20px;
  cursor:pointer;
}
.labeltoggle::before{
  content:'\1F575'; /* present */
}

body,.interactive{
  background-color:red;
}

.wrapper{
  max-width:800px;
  margin:0px auto;
  margin-top:20px;
  text-align:center;
  background-color:red;

}


.gift{
  width:200px;
  height:200px;
  background-color:white;
  border-radius:100px;
  text-align:center;
  margin-top:10px;
}

.lblcont{
  width:200px;
  height:50px;
  opacity:0;
  overflow:hidden;
  margin-top:-50px;  
}

.lblcont label{
  box-sizing: border-box;
  height:50px;
  display:block;
  position:relative;
  cursor:pointer;
  padding-right:10px;
}

.lblcont img{
  float:left;
  width:170px;
  height:50px;
  background-color:#eeeeee;
}

 

.gift::before{
  content:'\1F381'; /* present */
  font-size:70px;
  display:inline-block;
  width:200px;
  line-height:200px;
  margin-top:10px;

}
input[name="rr"]:checked ~ .gift::before{
  font-size:70px;
  margin-top:8px;
}


#r1:checked ~ .gift::before{
  /*content:'\1F937'; /* shrug */
  content:'\1F615'; /* confused */
}
#r2:checked ~ .gift::before{
  content:'\1F6B2'; /* bicycle */
}
#r3:checked ~ .gift::before{
  content:'\1F369'; /* donut */
}
#r4:checked ~ .gift::before{
  content:'\1F388'; /* balloon */
}
#r5:checked ~ .gift::before{
  content:'\1F436'; /* puppy */
}
#r6:checked ~ .gift::before{
  content:'\1F4CE'; /* paperclip */
}

.btn{
  font-family:Helvetica,Arial;
  font-size:25px;
  width:200px;
  height:50px;
  line-height:50px;
  background-color:green;
  color:white;
  text-align:center;
  border:2px solid #552222;
  border-radius:8px;
  margin:20px 0px;
  overflow:hidden;
}


@keyframes shiftlbl {
  from{
    transform: translateY(0px);    
  }
  to {
    transform: translateY(-300px);
  }
}

.btn .lblinner{
  animation: shiftlbl 0.6s steps(6,end) infinite;  
}

.lblinner:hover{
  animation-play-state: paused;
}

.title{
  font-size:38px;
  font-family:Lobster,Helvetica Neue, Arial;
  color:#ffffff;
  clear:both;
}

.rset{
  width:200px;
  height:50px;
  box-sizing: border-box;
  display:block;
  position:relative;
  background-color:blue;
  cursor:pointer;  
}

input[name="rr"]:checked ~ .btn .rset{
  margin-top:-50px;
}

#showlabels:checked ~ form .lblcont {
  text-align:right;
  opacity:0.8;
}

</style>
</head>
<body>





<div class="wrapper">

<table width="100%"><tr><td>
<!--[if !mso]><!-->
<div class="interactive" >
  <label for="showlabels" class="labeltoggle" for></label>
  <input type="checkbox" id="showlabels"><BR>
  <form>
  <div class="wrapper">
  <center>
  <div class="title">
  What's in the box?
  </div>
  <input id="rs" type="reset" value="reset" style="display:none;"> 
  <input type="radio" id="r1" name="rr">
  <input type="radio" id="r2" name="rr">
  <input type="radio" id="r3" name="rr">
  <input type="radio" id="r4" name="rr">
  <input type="radio" id="r5" name="rr">
  <input type="radio" id="r6" name="rr">
  <BR>
  <div class="gift">
  </div><BR>
  <div class="btn">Open
    <div class="lblcont">
      <div class="lblinner">
      <label for="r1"><img>1</label>
      <label for="r2"><img>2</label>
      <label for="r3"><img>3</label>
      <label for="r4"><img>4</label>
      <label for="r5"><img>5</label>
      <label for="r6"><img>6</label>
      </div>
    </div>
    <label class="rset" for="rs">Try Again</label>
  </div>
  </center>
  </div>
  </form>
  <BR>
</div>
<!--<![endif]-->



</td></tr></table>


</div>
</body>
</html>
            
          
!
            
              /* WARNING: Theres a bug that makes emoji characters appear tiny in iOS 9 
Emojis cannot have font size larger than 70px in Android

Learn more about this here:
https://www.emailonacid.com/blog/article/email-development/how-to-build-an-interactive-magic-8-ball-for-email

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

Console