123

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.

            
              <a href="TESTE"><button>
  <i class='fontawesome-ok'></i>
  <span>Me Adicione</span>
  </button></a>
            
          
!
            
              @import "nib"

@import url('http://weloveiconfonts.com/api/?family=fontawesome')
  
/* fontawesome */
[class*="fontawesome-"]
  font-style: normal
  &:before
    font-family: 'FontAwesome', sans-serif

@keyframes shine
  100%
    left: 100%

*, *:before, *:after
  box-sizing: border-box

html, body
  height: 100%
  
html
  overflow-x: hidden
  overflow-y: scroll
  text-rendering: optimizeLegibility
  text-size-adjust: 100%

body
  width: 100%
  background: #232323 url('https://i.imgur.com/5HldDuP.png') center center no-repeat
  background-size: cover

absolute-center(w, h)
  display: block
  position: absolute
  top: 50%
  left: 50%
  margin-top: -(h / 2)
  margin-left: -(w / 2)

fancy-btn(
    backgroundColor = #232323,
    textColor = null,
    buttonWidth = 160px,
    buttonHeight = 60px,
    borderSize = 4px,
    innerSpacing = 1em 2em,
    gradient = 'LightSkyBlue, NavajoWhite, LightCoral, NavajoWhite, LightSkyBlue',
    outerBorder = null
  )
  outerBorderSize = outerBorder ? outerBorder[0] : null
  gradientWidth = outerBorderSize ? (buttonWidth - borderSize * 2) - outerBorderSize * 2 : buttonWidth - borderSize * 2
  gradientHeight = outerBorderSize ? (buttonHeight - borderSize * 2) - outerBorderSize * 2 : buttonHeight - borderSize * 2
  textColor = light(backgroundColor) ? #555 : #ccc unless textColor
  tap-highlight-color: blue
  backface-visibility: hidden
  transform: translateZ(0)
  border: outerBorder ? outerBorder : none
  line-height: 1.5
  font-size: 12px
  font-smoothing: subpixel-antialiased
  text-transform: uppercase
  font-weight: 700
  letter-spacing: 2px
  color: textColor
  padding: innerSpacing
  border-radius: borderSize
  display: inline-block
  position: relative
  overflow: hidden
  vertical-align: middle
  width: 100%
  max-width: buttonWidth
  height: buttonHeight
  background-color: backgroundColor
  background: linear-gradient(0deg, backgroundColor, backgroundColor) borderSize borderSize / gradientWidth gradientHeight no-repeat,
              linear-gradient(90deg, gradient) 0% 0% / 200% 100% no-repeat
  box-shadow: 0 0 3px 2px rgba(0,0,0,0.3)
  transition: transform 75ms linear, background 250ms linear
  user-select: none
  .no-touch &:hover, &:active, &:focus
    color: light(textColor) ? lighten(textColor, 80%) : darken(textColor, 80%)
    background: linear-gradient(0deg, backgroundColor, backgroundColor) borderSize borderSize / gradientWidth gradientHeight no-repeat,
                linear-gradient(90deg, gradient) 100% 0% / 200% 100% no-repeat
  .no-touch &:active, .touch &.hover-effect:after
    transform: translateZ(0) translateY((buttonHeight / 10)) scale(0.95)
  .no-touch &:hover:after, .touch &.hover-effect:after
    content: ''
    position: absolute
    width: buttonWidth
    left: -(buttonWidth)
    top: 0
    transform: skewX(-20deg)
    background-image: linear-gradient(to right,transparent,rgba(white, .08),transparent)
    height: buttonHeight
    animation: shine .5s ease
  > *
    display: inline-block
    vertical-align: middle
  

button
  fancy-btn(
    outerBorder: 1px solid white,
    borderSize: 2px,
    buttonWidth: 200px
  )
  absolute-center: 200px, 60px
  .fontawesome-heart
    color: pink
    font-size: 16px
            
          
!
            
              $(document).ready(function() {
    $('button').bind('touchstart touchend', function(e) {
        $(this).toggleClass('hover-effect');
    });
});
            
          
!
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.

Console