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


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


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.


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.


                <div class="panel">
  <button type="button">Hello world!</button>

<div class="panel green-panel">
  <button type="button">Hello world!</button>

<div class="panel orange-panel">
  <button type="button">Hello world!</button>

<div style="clear:both;"><a href=""> Thanks John W. Long</a></div>


                @import "compass/css3";

@mixin semi-transparent-colors($attribute,$color,$background){
	$percent: alpha($color) * 100%; //获取颜色透明度值,并转换成百分比
	$opaque: opacify($color,1); //使颜色不透明
	$solid-color: mix($opaque,$background,$percent);
	@if ($percent < 100%) {
		#{$attribute}: $solid-color; //设置不透明的颜色,为不支持rgba颜色的浏览器服务	
	#{$attribute}: $color;//设置透明颜色,为支持rgba颜色的浏览器服务

@mixin color-button($text,$color,$background:white) {
	@include semi-transparent-colors("border-color",rgba(black,.7),$background);
	@include semi-transparent-colors("background-color",$color,$background);
	@include semi-transparent-colors("color",$text,$background);
	&:focus {
		@include semi-transparent-colors("background-color",transparentize($color,.2),$background);
		@include semi-transparent-colors("color",opacify($text,1),$background);
	&:active {
		@include semi-transparent-colors("background-color",opacify($color,1),$background);
		box-shadow: none;

%button {
	border: 1px solid;
	box-shadow: inset 0 1px 0 rgba(white,.2);
  text-shadow: 0 1px 1px rgba(255, 255, 255, 1);
  font: {
	  size: 14px;
	  family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  padding: .4em 1em .5em;
  cursor: pointer;

.panel {
	width: 220px;
  padding: 50px;
  text-align: center;
  margin: 15px;
  background: gray;
  box-sizing: border-box;
  float: left;
    @extend %button;
	  @include color-button(rgba(white, 0.8), rgba(black, 0.5), gray); 
.green-panel {
  background: #393;
  	@include color-button(rgba(white, 0.8), rgba(black, 0.5), #393); 

.orange-panel {
  background: #f73;
  	@include color-button(rgba(white, 0.8), rgba(black, 0.5), #f73);