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

              
                <h1 class="title">Focus Pocus</h1>
<p class="small">(tab to focus, then be amazed)</p>

<button class="scroll-btn"> 
  <svg version="1.1" id="scroll-toggle" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 130 130" enable-background="new 0 0 130 130" xml:space="preserve">
    <circle class="circle" stroke="#FF0000" stroke-miterlimit="10" cx="65" cy="65" r="60"/>
    <path class="arrow" fill="none" stroke-miterlimit="10" d="M32.3,58.1c2.5,2.2,32,29.8,32,29.8l33.4-29.8"/>
  </svg> 
</button>
              
            
!

CSS

              
                @import "compass/css3";

@import url(https://fonts.googleapis.com/css?family=Oswald);

body{
  font-family: "Oswald", sans-serif;
}

// keyframes mixin
@mixin keyframes($name) {
  @keyframes #{$name} {
    @content;
  } 
}

@mixin animation ($animation, $duration, $easing, $iterations, $delay) {
    animation-delay: $delay;
    animation-duration: $duration;
    animation-name: $animation;
    animation-iteration-count: $iterations;
    animation-timing-function: $easing;
}


.scroll-btn{
	color: red;
  top: 35px;
	width: 60px;
	height: 60px;
	position: relative;
	background-color: transparent;
	padding: 0px;
  margin: 0 auto;
  display: block;
  border: 5px solid transparent;
	@include transition(all 300ms ease-out);
	@include box-shadow(white 0px 0px 0px 0px);
	@include border-radius(0%);

	&:focus{
		outline: none;
		@include rotate(-45deg);
		@include box-shadow(red 0px 0px 0px 5px);
     @include border-radius( 50% 50% 50% 3%);

		#scroll-toggle{
			@include rotate(45deg);
		}
	}
}


#scroll-toggle{
	@include rotate(0deg);
	@include transition(all 300ms ease-out);
	
	.circle{
		fill: transparent;
		stroke-width: 3;
	}

	.arrow{
		stroke: red;
		stroke-width: 3;
	}

	.arrow, .circle{
		@include transition(all 300ms ease-out);
	}

	&:hover{
    .circle{
      fill: red;
    }

    .arrow{
      stroke-width: 5;
      stroke: white;
      @include animation(upAndDown, 1s, linear, infinite, 0s);

    }
  }
}

@include keyframes(upAndDown) {
  0%, 50%, 100% {
  	@include translate3d(0px, 0px, 0px);
  }

  15% {
  	@include translate3d(0px, 5px, 0px);
  }

  85% {
  	@include translate3d(0px, -5px, 0px);
  }
}

.title{
  font-size: 5vw;
  text-transform: uppercase;
  text-align: center;
  color: red;
  margin: 1rem;  
}

.small{
  font-size: 2vw;
  text-align: center;
  color: red;
  
}
              
            
!

JS

              
                
              
            
!
999px

Console