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

              
                <!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8" />
  <title>Web Design - CSS Background-color, Border-radius, Transition, and Transform Properties Experiment</title>
</head>

<body>
  <section id="container">
    <h2>Colored Boxes</h2>
    <p>Red box with Opacity set to 1 (fully opaque) and border radius set to 25px.</p>
    <div id="one">

    </div>
    <p>Blue box with Opacity set to 0.3 (so, on top of the reddish background, it looks purple).</p>
    <div id="two">

    </div>

    <p><strong>Hover over the green box below.</strong><br>[Green box with transition set to margin-left 2s and transform set to 2s. Also, on hover, transform perspective(.5em) is set. This causes the perspective to transform to .5em distance from the user to the z=0 plane. And, on hover, transform: rotateX(3deg) is set. This causes only the x-axis to rotate 3 degrees, making the box appear to transform into a trapezoid.]</p>

    <div id="three">

    </div>
  </section>
</body>

</html>
              
            
!

CSS

              
                #container {
  height: 750px;
  width: 750px;
  background: url("https://res.cloudinary.com/bobdowns/image/upload/v1586295050/GIT237/Assignment005/triangle_vms32j.svg");
}

div {
  height: 100px;
  width: 100px;
}

p,
h2 {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue",
    Helvetica, Arial, "Lucida Grande", sans-serif;
  font-weight: 300;
  color: rgba(255, 255, 255, 1);
}

#one {
  background-color: rgba(255, 0, 0, 1);
  border-radius: 25px;
}

#two {
  background-color: rgba(0, 0, 255, 0.3);
}

#three {
  background-color: rgba(0, 255, 0, 1);
  -webkit-transition: margin-left 2s, transform 2s;
  /* Safari */
  transition: margin-left 2s, transform 2s;
}

#three:hover {
  background-color: rgba(0, 255, 0, 1);
  margin-left: 50px;
  -webkit-transform: perspective(0.5em) rotateX(3deg);
  /* Safari */
  transform: perspective(0.5em) rotateX(3deg);
}

              
            
!

JS

              
                
              
            
!
999px

Console