Babel includes JSX processing.
Any URL's added here will be added as
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
.button Hover me .bg-1 .bg-2
body background-color: #000 .button display: inline-block position: fixed top: 50% left: 50% z-index: 2 border: 2px solid rgba(#fff, 0.6) padding: 20px 32px transform: translate(-50%, -50%) font-family: sans-serif text-transform: uppercase color: rgba(#fff, 0.8) cursor: pointer transition: border-color 0.5s, background-color 0.5s, color 0.5s &:hover background-color: #fff border-color: transparent color: #444 ~ .bg-1 opacity: 0 ~ .bg-2 // To darken the picture I'm using only 70% opacity and // a black background color opacity: 0.7 $bg position: fixed top: 0 left: 0 z-index: 1 width: 100% height: 100% background-repeat: no-repeat background-position: center center transition: opacity 1s .bg-1 @extends $bg background-image: url('//lorempixel.com/g/1920/1200/nature/5/') opacity: 0.6 .bg-2 @extends $bg background-image: url('//lorempixel.com/g/1920/1200/animals/3/') opacity: 0
/* Unfortunately, this method is somewhat impractical as you have to place background elements after the button and set a smaller z-index which requires absolute/fixed positioning. Still, not that big of a deal with only a few elements and it looks cool. --- Changelog: 4/10/2016 * Figured out I wasn't that bright while writing the original code * Cleaned and improved the code * Changed Slim to Jade and Sass to Stylus - not because they're better or anything, I just wanted to * Spent a few minutes to come up with some clever changelog message 12/9/2014 * Made some miscellaneous improvements * Cleaned the code even, even more 9/20/2014 * Improved fallback for larger resolutions * Cleaned the code even more 9/17/2014 * Translated HTML to Slim and CSS to Sass for easier editing * Made some small fixes and removed headers * Fixed the images again 6/7/2014 * Fixed the images */
Also see: Tab Triggers