Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <div class="box">
  <h2>CSS List Item Hover Effect</h2>
  <ul>
    <li><span>1</span> List Item One</li>
    <li><span>2</span> List Item Two</li>
    <li><span>3</span> List Item Three</li>
    <li><span>4</span> List Item Four</li>
    <li><span>5</span> List Item Five</li>
    <li><span>6</span> List Item Six</li>
  </ul>
</div>
              
            
!

CSS

              
                * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}
body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #f6f6f6;
}
.box {
  width: 300px;
  border-bottom: 20px solid #03a9f4;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}
.box h2 {
  color: #fff;
  background: #03a9f4;
  padding: 10px 20px;
  font-size: 20px;
  font-weight: 700;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}
.box ul {
  position: relative;
  background: #fff;
}
.box ul:hover li {
  opacity: 0.2;
}
.box ul li {
  list-style: none;
  padding: 10px;
  width: 100%;
  background: #fff;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.5s;
}
.box ul li:hover {
  transform: scale(1.1);
  z-index: 5;
  background: #25bcff;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
  color: #fff;
  opacity: 1;
}
.box ul li span {
  width: 20px;
  height: 20px;
  text-align: center;
  line-height: 20px;
  background: #25bcff;
  color: #fff;
  display: inline-block;
  border-radius: 50%;
  margin-right: 10px;
  font-size: 12px;
  font-weight: 600;
  transform: translateY(-2px);
}
.box ul li:hover span {
  background: #fff;
  color: #25bcff;
}
              
            
!

JS

              
                
              
            
!
999px

Console