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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <body>
  <div class="wrapper">

    <div class="box default">
      <div class="text">default</div>
    </div>

    <div class="box style-1">
      <div class="text">style-1</div>
    </div>

    <div class="box style-2">
      <div class="text">style-2<br>マウスオーバーで上下の色反転</div>
    </div>

    <div class="box style-3">
      <div class="text">style-3<br>マウスオーバーで色と透明度が変化</div>
    </div>

    <div class="box style-4">
      <div class="text">style-4<br>マウスオーバーで薄い色に</div>
    </div>

    <div class="box style-5">
      <div class="text">style-5</div>
    </div>

    <div class="box style-6">
      <div class="text">style-6<br>マウスオーバーでグラデーションの位置がずれる</div>
    </div>

    <div class="box style-7">
      <div class="text">style-7<br>マウスオーバーでグラデーション反転</div>
    </div>

    <div class="box style-8">
      <div class="text">style-8<br>マウスオーバーで透明度が増す</div>
    </div>

    <div class="box style-9">
      <div class="text">style-9<br>マウスオーバーで濃い色に</div>
    </div>

  </div>
</body>
              
            
!

CSS

              
                body {
  margin: 0;
  background-color: #fefefe;
  font-family: sans-serif;
  font-size: 12px;
  color: #808080;
}

.wrapper {
  margin: 30px auto;
  width: 500px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.box {
  width: 80px;
  height: 200px;
  background-color: #fbfbfb;
  box-shadow: inset 3px 3px 5px rgb(100, 100, 100, 0.6);
  overflow-y: scroll;
}

.text {
  padding: 8px;
  min-height: 400px;
}

/*-- style-1 -------------------*/
.style-1::-webkit-scrollbar {
  width: 12px;
}

.style-1::-webkit-scrollbar-track {
  border-radius: 6px;
  background-color: #fff;
  box-shadow: inset -1.5px -2px 4px rgba(0, 0, 0, 0.3);
}

.style-1::-webkit-scrollbar-thumb {
  border-radius: 6px;
  background-color: #777;
  box-shadow: inset 3px 3px 6px rgba(255, 255, 255, 0.9);
}

/*-- style-2 -------------------*/
.style-2::-webkit-scrollbar {
  width: 12px;
  background-color: #fff;
}

.style-2::-webkit-scrollbar-track {
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3);
  background-color: #fefefe;
  border-radius: 6px;
}

.style-2::-webkit-scrollbar-thumb {
  border-radius: 6px;
  background-image: linear-gradient(135deg, #000 0 50%, #fff 50% 100%);
  box-shadow: inset 3px 3px 6px rgba(255, 255, 255, 0.8), inset -2px -2px 3px rgba(100, 100, 100, 0.3);
}

.style-2::-webkit-scrollbar-thumb:hover {
  background-image: linear-gradient(135deg, #fff 0 50%, #000 50% 100%);
}

/*-- style-3 -------------------*/
.style-3::-webkit-scrollbar {
  width: 12px;
}

.style-3::-webkit-scrollbar-track {
  background-image: repeating-linear-gradient(to bottom, #fff, #fff 12px, #ddd 12px, #ddd 20px);
  box-shadow: inset 2px 2px 4px #464646;
}

.style-3::-webkit-scrollbar-thumb {
  background-color: rgba(240, 240, 240, 0.8);
  box-shadow: inset 2px 2px 4px rgba(255, 255, 255, 0.9), inset -2px -2px 3px rgba(150, 150, 150, 0.2);
}

.style-3::-webkit-scrollbar-thumb:hover {
  background-color: rgba(150, 150, 150, 0.3);
}

/*-- style-4 -------------------*/
.style-4::-webkit-scrollbar {
  width: 10px;
}

.style-4::-webkit-scrollbar-track {
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.8);
  background-size: 10px 10px;
  background-image: repeating-conic-gradient(from 0deg, #fff 0deg 90deg, #ccc 90deg 180deg);
}

.style-4::-webkit-scrollbar-thumb {
  background-size: 10px 10px;
  background-image: repeating-conic-gradient(from 0deg, #fff 0deg 90deg, #000 90deg 180deg);
  background-repeat: repeat;
  box-shadow: inset 3px 3px 6px rgba(255, 255, 255, 0.6), inset -1.5px -2px 2px rgba(0, 0, 0, 0.2);
}

.style-4::-webkit-scrollbar-thumb:hover {
  background-image: repeating-conic-gradient(from 0deg, #fff 0deg 90deg, #888 90deg 180deg);
}

/*-- style-5 -------------------*/
.style-5::-webkit-scrollbar {
  width: 20px;
}

.style-5::-webkit-scrollbar-track {
  background-image: linear-gradient(145deg, #d5e3ff, #b2c6ee);
  box-shadow: inset 3px 3px 5px #44577c;
}

.style-5::-webkit-scrollbar-thumb {
  background-image: linear-gradient(145deg, #9ac4ff, #607aae);
  box-shadow: inset 6px 6px 10px #dbe7ff, inset -1px -1px 3px #516894;
  border-radius: 10px;
}

/*-- style-6 -------------------*/
.style-6::-webkit-scrollbar {
  width: 10px;
}

.style-6::-webkit-scrollbar-track {
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2);
  background-color: rgba(237, 204, 235, 0.5);
}

.style-6::-webkit-scrollbar-thumb {
  background-image: linear-gradient(135deg,#e3a3d5 25%,#a49dd1 25%,#a49dd1 50%,#ecbce0 50%,#ecbce0 75%,#d48ed3 75%,#d48ed3);
  box-shadow: inset 3px 3px 6px rgba(255, 255, 255, 0.8), inset -2px -2px 3px rgba(100, 100, 100, 0.3);
}

.style-6::-webkit-scrollbar-thumb:hover {
  background-image: linear-gradient(135deg,#d48ed3 25%,#e3a3d5 25%,#e3a3d5 50%,#a49dd1 50%,#a49dd1 75%,#ecbce0 75%,#ecbce0);
}

/*-- style-7 -------------------*/
.style-7::-webkit-scrollbar {
  width: 14px;
  background-color: #fff;
}

.style-7::-webkit-scrollbar-track {
  background-image: linear-gradient(145deg, #ff00b333, #0055ff2a);
  box-shadow: inset 3px 3px 5px #4a6291;
  border-radius: 2px;
}

.style-7::-webkit-scrollbar-thumb {
  background-image: linear-gradient(145deg, #ff00b3, #0055ff);
  box-shadow: inset 4px 4px 8px rgba(255, 255, 255, 0.8), inset -2px -2px 4px rgba(0, 0, 0, 0.3);
  border-radius: 2px;
}

.style-7::-webkit-scrollbar-thumb:hover {
  background-image: linear-gradient(145deg, #0055ff, #ff00b3);
}

/*-- style-8 -------------------*/
.style-8::-webkit-scrollbar {
  width: 16px;
  background-color: #fff;
}

.style-8::-webkit-scrollbar-track {
  border-radius: 2px;
  background-image: linear-gradient(0deg, #ff00b3, #0055ff);
  box-shadow: inset 3px 3px 6px #382c44;
}

.style-8::-webkit-scrollbar-thumb {
  border-radius: 2px;
  background-color: rgba(240, 240, 240, 0.8);
  box-shadow: inset 3px 3px 6px rgba(255, 255, 255, 0.9);
}

.style-8::-webkit-scrollbar-thumb:hover {
  background-color: rgba(240, 240, 240, 0.2);
}

/*-- style-9 -------------------*/
.style-9::-webkit-scrollbar {
  width: 12px;
  background-color: #fff;
}

.style-9::-webkit-scrollbar-track {
  border: 2px solid #ffee00;
}

.style-9::-webkit-scrollbar-thumb {
  background-color: #fff88f;
}

.style-9::-webkit-scrollbar-thumb:hover {
  background-color: #ffee00;
}
              
            
!

JS

              
                
              
            
!
999px

Console