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

              
                <!-- This is a modified version of what Baron created at codepen.io (https://codepen.io/b29/pen/qNVNyy) -->
<div id="container">
  <div class="outer">

    <!-- front -->
    <div class="front">
      <h2>The Effects of Smoking</h2>
      <p>Although the number of African American smokers continues to decline, approximately 8 out 10 black people who use tobacco products choose menthol products. The minty flavor of menthol makes it easier to start smoking and harder to quit.</p>
<img align="right" src="https://www.indplsul.org/wp-content/uploads/2020/05/Husban-and-wife.jpg" width="143" height="201" style="vertical-align:middle;margin:0px 15px">      
    </div>

    <!-- back -->
    <div class="back">
      <h2>The Effects of Smoking</h2>
      <p>For decades, Big Tobacco has targeted black and minority communities through point of sale marketing, billboards, scholarships, free giveaways, and images claiming that smoking and vaping are cool.</p>
      <img src="https://www.indplsul.org/wp-content/uploads/2020/05/Its-A-Hoax.jpg" width="225" height="225" style="vertical-align:middle;margin:0px 35px">
    </div>

    <!-- sides -->
    <div class="sides">
      <div class="left">
        <h2>20</h2>
        <span>Menthol Flavored Cigarettes</span>
      </div>
      <div class="right">
        <h2>20</h2>
        <span><img src="http://baronwatts.com/img/barcode.jpg">Call 1-800-QuitNow for free support in starting your journey towards living a tobacco free life.</span>
      </div>
      <div class="top">
        <h2>Pack of<br><small>Cigarettes</small></h2></div>
      <div class="bottom">
        <h2>Pack of<br><small>Cigarettes</small></h2></div>
    </div>


  </div>
  <!-- /outer -->
</div>
<!-- /container -->
              
            
!

CSS

              
                html {
  box-sizing: border-box;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

html,
body {
  font-family: 'Helvetica', sans-serif;
	color: white;
}

#container {
  width: 300px;
  height: 500px;
  margin: 60px auto;
  -moz-perspective: 1000px;
  -webkit-perspective: 1000px;
  perspective: 1000px;
}

#container h2 {
  text-align: center;
  font-size: 1.6em;
  color: #203732;
	color: #000000;
  background: linear-gradient(10deg, #f1f1f1 25%, white 45%);
  margin: 0;
  padding: 37px 0;
  border-bottom: 20px solid #7e7c6f;
}

#container .sides h2 {
  background: linear-gradient( 25deg, #f1f1f1 30%, #ccc 31%, #f1f1f1 32%);
}

#container .top h2 {
  font-size: 1.5em;
  position: relative;
  top: 50%;
  background: none;
  border-bottom: none;
  transform: translateY(-50%) rotate(-90deg);
}

#container .bottom h2 {
  color: white;
  font-size: 1.5em;
  position: relative;
  top: 50%;
  background: none;
  border-bottom: none;
  transform: translateY(-50%) rotate(90deg) scale(-1, 1);
  /*scale(-1, 1) flips the text */
}

#container .right h2,
#container .left h2 {
  text-indent: -9999px;
  padding-top: 50px;
}

#container .right h2::after {
  content: '20';
  text-indent: 0;
  font-size: .8em;
  position: absolute;
  left: 50%;
  top: 0;
  margin-top: 10px;
  padding-top: 5px;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  border: 1px dotted #15635e;
  border-radius: 50%;
}

#container h3 {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  text-shadow: 1px 1px 1px black;
}

#container h3::before {
  content: '';
  position: absolute;
  background: url('http://baronwatts.com/img/newport-logo.png');
  background-size: cover;
  width: 100px;
  height: 50px;
  top: -50px;
  left: 80px;
}

.outer {
  -moz-transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  -webkit-animation: rotate-box 50s linear infinite;
  -moz-animation: rotate-box 50s linear infinite;
  -o-animation: rotate-box 50s linear infinite;
  -ms-animation: rotate-box 50s linear infinite;
  animation: rotate-box 50s linear infinite;
  height: 100%;
  width: 100%;
}

.front,
.back {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  /*  border-radius: 40px;*/
  /* smooths out jagged edge in firefox*/
  outline: 1px solid transparent;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: repeating-linear-gradient( 180deg, #15635e, #15635e 10px, #1b756f 10px, #1b756f 20px);
}

.front {
  -moz-transform: translateX(0) rotateY(0deg) translateZ(50px);
  -ms-transform: translateX(0) rotateY(0deg) translateZ(50px);
  -webkit-transform: translateX(0) rotateY(0deg) translateZ(50px);
  transform: translateX(0) rotateY(0deg) translateZ(50px);
}

.back {
  -moz-transform: translateX(0) rotateY(180deg) translateZ(50px);
  -ms-transform: translateX(0) rotateY(180deg) translateZ(50px);
  -webkit-transform: translateX(0) rotateY(180deg) translateZ(50px);
  transform: translateX(0) rotateY(180deg) translateZ(50px);
  /* background: linear-gradient( 45deg, black 30%, #111, black, black);*/
}

.sides > * {
  position: absolute;
}

.left,
.right {
  transform: rotateY(90deg);
  width: 100px;
  height: 100%;
  background: repeating-linear-gradient( 180deg, #15635e, #15635e 10px, #185a5a 10px, #185a5a 20px);
  font-size: .5em;
}

.left {
  right: 83%;
}

.left span {
  width: 360px;
  height: 70px;
  background: #15635e;
  display: block;
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translateX(-50%) rotate(-90deg) scale(-1, 1);
  text-align: center;
  color: white;
  font-size: 1.5em;
  padding: 10px 0;
}

.right {
  left: 83%;
}

.right span {
  width: 360px;
  height: 70px;
  background: #15635e;
  display: block;
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translateX(-50%) rotate(-90deg);
  color: white;
  font-size: 1.5em;
  padding: 0;
}

.right span > img {
  float: left;
  margin-right: 5px;
}

.top {
  transform: rotateX(90deg) rotateY(0deg) rotateZ(90deg);
  width: 100px;
  height: 300px;
  background: white;
  bottom: 70%;
  left: 33.5%;
}

.bottom {
  transform: rotateX(90deg) rotateY(0deg) rotateZ(90deg);
  width: 100px;
  height: 300px;
  background: #185a5a;
  top: 70%;
  left: 33.5%;
}


/*keyframes*/
@-moz-keyframes rotate-box {
  0% {
    -moz-transform: rotateY(0);
    -webkit-transform: rotateY(0);
    transform: rotateY(0);
  }
  100% {
    -moz-transform: rotateY(360deg);
    -webkit-transform: rotateY(360deg);
    transform: rotateY(360deg);
  }
}

@-webkit-keyframes rotate-box {
  0% {
    -moz-transform: rotateY(0);
    -webkit-transform: rotateY(0);
    transform: rotateY(0);
  }
  100% {
    -moz-transform: rotateY(360deg);
    -webkit-transform: rotateY(360deg);
    transform: rotateY(360deg);
  }
}

@-o-keyframes rotate-box {
  0% {
    -moz-transform: rotateY(0);
    -webkit-transform: rotateY(0);
    transform: rotateY(0);
  }
  100% {
    -moz-transform: rotateY(360deg);
    -webkit-transform: rotateY(360deg);
    transform: rotateY(360deg);
  }
}

@-ms-keyframes rotate-box {
  0% {
    -moz-transform: rotateY(0);
    -webkit-transform: rotateY(0);
    transform: rotateY(0);
  }
  100% {
    -moz-transform: rotateY(360deg);
    -webkit-transform: rotateY(360deg);
    transform: rotateY(360deg);
  }
}

@keyframes rotate-box {
  0% {
    -moz-transform: rotateY(0);
    -webkit-transform: rotateY(0);
    transform: rotateY(0) rotateX(10deg) rotateZ(-30deg);
  }
  100% {
    -moz-transform: rotateY(-360deg);
    -webkit-transform: rotateY(-360deg);
    transform: rotateY(-360deg) rotateX(10deg) rotateZ(-30deg);
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console