css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <hr class="fade">
<hr class="fade-2">
<hr class="dots">
<hr class="accessory">
<hr class="pill">
<hr class="vertical-lines">
<hr class="horizontal-lines">
<hr class="slash-1">
<hr class="slash-2">
<hr class="slash-3">
<hr class="bookends">
<hr class="bookends-dots">
<hr class="flair">
<hr class="wave">
<hr class="shine">
<hr class="charlie">
<hr class="stars">
            
          
!
            
              /* Reset */
*:before, *:after { content: ''; }
hr {
  border: 0;
  margin: 1.35em auto;
  max-width: 100%;
  background-position: 50%;
  box-sizing: border-box;
}

.fade {
  height: 1px;
  $color: red;
  color: $color;
  background-image: linear-gradient(
    90deg,
    rgba($color, 0),
    rgba($color, 1) 50%,
    rgba($color, 0) 100%);
}

.fade-2 {
  border-width: 0 0 1px;
  $color: skyblue;
  color: $color;
  border-image: linear-gradient(
    90deg,
    rgba($color, 0),
    rgba($color, 1) 50%,
    rgba($color, 0) 100%) 0 0 100%;
  border-style: solid;
}

.dots {
  $color: orange;
  color: $color;
  // height: 8px;
  border-width: 0 0 8px;
  border-style: solid;
  border-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2 1" width="8" height="4"><circle fill="#{$color}" cx="1" cy="0.5" r="0.5"/></svg>') 0 0 100% repeat;
   width: 216px;
}

.accessory {
  height: 6px;
  background-image: radial-gradient(
    closest-side,
    hsla(0, 0%, 50%, 1.0),
    hsla(0, 0%, 50%, 0) 100%);
  position: relative;
}
.accessory:after {
  position: absolute;
  top:  50%;
  left: 50%;
  display:block;
  background-color: hsl(0, 0%, 75%);
  height: 12px;
  width:  12px;
  transform: rotate(45deg);
  margin-top:  -10px;
  margin-left: -10px;
  border-radius: 4px 0;
  border: 4px solid hsla(0, 0%, 100%, 0.35);
  background-clip: padding-box;
  box-shadow: -10px 10px 0 hsla(0, 0%, 100%, 0.15), 10px -10px 0 hsla(0, 0%, 100%, 0.15);
}

.pill {
  height:0px;
  border-radius: 2px;
  $color: teal;
  color: $color;
  border: 2px solid currentColor;
  width: 80%;
}

.vertical-lines {
  height: 10px;
  $color: orange;
  color: $color;
  background-image: linear-gradient(
    90deg,
    currentColor,
    currentColor 33.33%,
    transparent 33.33%,
    transparent 100%);
  background-size: 3px 100%;
  width: 60%;
}

.horizontal-lines {
  height: 10px;
  $color: green;
  color: $color;
  background-image: linear-gradient(
    currentColor,
    currentColor 33.33%,
    transparent 33.33%,
    transparent 100%);
  background-size: 100% 3px;
  width: 40px;
}

.slash-1 {
  height: 10px;
  $color: rebeccapurple;
  color: $color;
  background-image: linear-gradient(-45deg,
    transparent,
    transparent 25%,
    currentColor 25%,
    currentColor 50%,
    transparent 50%,
    transparent 75%,
    currentColor 75%);
  background-size: 10px 10px;
  width: 250px;
}

.slash-2 {
  height: 8px;
  $color: darkmagenta;
  color: $color;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="3px" height="3px" viewBox="0 0 3 3" fill="#{$color}"><polygon points="0,0.5 0,1.5 1.5,3 2.5,3"/><polygon points="2.5,0 1.5,0 3,1.5 3,0.5"/></svg>');
  background-size: 3px 3px;
  width: 65%;
}

.slash-3 {
  height: 10px;
  background-image: linear-gradient(45deg,
    hsla(0, 0%, 5%, 0),
    hsla(0, 0%, 5%, 0) 33.33%,
    hsla(0, 0%, 5%, 1) 33.33%,
    hsla(0, 0%, 5%, 1) 66.67%,
    hsla(0, 0%, 5%, 0) 66.67%,
    hsla(0, 0%, 5%, 0) 100%);
  background-size: 10px 100%;
  width: 250px;
}

.bookends {
  position: relative;
  border-width: 5px;
  border-color: hsl(0, 0%, 50%) transparent;
  height: 11px;
  border-style: double;
  width: 20%;
}
.bookends:before,
.bookends:after {
  position: absolute;
  bottom: -3.536px;
  width: 7.071px;
  height: 7.071px;
  display: block;
  border-width: 0 7.071px 7.071px 0;
  border-color: hsl(0, 0%, 50%);
  border-style: double;
  box-sizing: border-box;
}
.bookends:before {
  transform: translateZ(0) rotate(-45deg);
  left: -21px;
}
.bookends:after {
  transform: translateZ(0) rotate(135deg);
  right: -21px;
}

.bookends-dots {
  position: relative;
  border-bottom: 1px solid hsla(0, 0%, 50%, 0.75);
  width: 50%;
}
.bookends-dots:before,
.bookends-dots:after {
  position: absolute;
  bottom: -5px;
  width: 10px;
  height: 10px;
  display: block;
  border-width: 0 1px 1px 0;
  border-color: hsla(0, 0%, 50%, 0.75);
  border-style: solid;
  box-sizing: border-box;
  border-radius: 100%;
}
.bookends-dots:before {
  transform: translateZ(0) rotate(-45deg);
  left: -10px;
}
.bookends-dots:after {
  transform: translateZ(0) rotate(135deg);
  right: -10px;
}

.flair {
  width: 65%;
  height: 30px;
  border-style: solid;
  border-color: hsla(0, 0%, 75%, 0.9);
  border-width: 1px 0 0 0;
  border-radius: 15px;
}
.flair:before {
  display: block;
  height: 30px;
  margin-top: -31px;    
  border-style: solid;
  border-color: hsla(0, 0%, 75%, 0.9);
  border-width: 0 0 1px 0;
  border-radius: 15px;
}


/* Wave */
@mixin wavy-border($color:#000, $stroke:1, $width:50, $height:25) {
  border-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 #{$width} #{$height+$stroke}" width="#{$width}" height="#{$height+$stroke}"><path fill="none" stroke="#{$color}" stroke-width="#{$stroke}" d="M0,#{$height+($stroke/2)}c#{$width/4},0,#{$width/4}-#{$height},#{$width/2}-#{$height}s#{$width/4},#{$height},#{$width/2},#{$height}"/></svg>') 0 0 100% repeat;
  border-width: 0 0 #{$height+$stroke}px;
  border-style: solid;
}

.wave {
  width: 35%;
  @include wavy-border(hsla(0, 0%, 75%, 0.9), 3, 12, 12);
  position: relative;
}

.wave:before,
.wave:after {
  position: absolute;
  display: block;
  width: 20px;
  height: 30px;
  background-color: hsl(0, 0%, 75%);
  bottom: -22.5px;
}

.wave:before {
  border-radius: 30px 0 0 30px;
  left: -2px;
}

.wave:after {
  border-radius: 0 30px 30px 0;
  right: -2px;
}

/* Shine */
.shine {
  height: 20px;
  width: 60%;
  background-image: radial-gradient(
    farthest-side at 50% -50%,
    hsla(0, 0%, 0%, 0.5),
    hsla(0, 0%, 0%, 0));
  position: relative; 
}

.shine::before {
  height: 1px;
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  background-image: linear-gradient(
    90deg,
    hsla(0, 0%, 0%, 0),
    hsla(0, 0%, 0%, 0.75) 50%,
    hsla(0, 0%, 0%, 0));
}

/* Charlie */
.charlie {
  position: relative;
  font-size: 1.5em;
  height: 1em;
  border: 0;
  -webkit-filter: drop-shadow(hsla(0, 0%, 0%, 0.75) 1px 3px 5px);
  width: 75%;
}

.charlie:before,
.charlie:after {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  background-size: 1em 100%;
  height: inherit;
}

.charlie:before {
  background-image:
    linear-gradient(315deg, hsla(0, 0%, 0%, 0.75) 25%, transparent 25%),
    linear-gradient(45deg, hsla(0, 0%, 0%, 0.75) 25%, transparent 25%);
  background-position: 50%;
  top: -0.5em;
}

.charlie:after {
  background-image: 
    linear-gradient(135deg, hsla(0, 0%, 0%, 0.75) 25%, transparent 25%),
    linear-gradient(225deg, hsla(0, 0%, 0%, 0.75) 25%, transparent 25%);
  background-position: -webkit-calc(50% - 0.5em);
  top: 0.5em;
}

.stars {
  height: auto;
  color: gold;
  text-align: center;
  &:after {
    content: "★";
    font-size: 2em;
    text-shadow:
      -2em 0,
      -1em 0,
       1em 0,
       2em 0;
  }
}

/* Background */
html {
  color: rgb(238, 238, 238);
  background: #f0ebdc;
}
            
          
!
            
              /**
 * I prefer to style the border's `border-image`, and I avoid using pseudo
 * elements when possible, so the styles may be applied to block level
 * elements, for use where an <hr> would be non-semantic.
 */

/* Inline XML data URI fix */
/* Some browsers (most browsers) don't render inline XML data URI's unless they are escaped. */
(function() {

if(!window.StyleFix) return;
if(hasxmldatauri()) return;
  
// Test unescaped XML data uri
function hasxmldatauri() {
  var img = new Image();
  datauri = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0,0 1,1" fill="#000"></svg>';
  img.src = datauri;
  return (img.width == 1 && img.height == 1);
}

StyleFix.register(function(css) {

  return css.replace(RegExp(/url\(\'data:image\/svg\+xml,(.*)\'\)/gi), function($0, svg) {
		return "url('data:image/svg+xml," + escape(svg) + "')";
	});
  
});

})();

/* Radial Gradient Syntax fix */
StyleFix.register(function(css, raw) {
	if (PrefixFree.functions.indexOf('radial-gradient') > -1) {
		css = css.replace(/radial-gradient\(([a-z-\s]+\s+)?at ([^,]+)(?=,)/g, function($0, shape, center){
			return 'radial-gradient(' + center + (shape? ', ' + shape : '');
		});
	}

	return css;
});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console