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.


   <h2>CSS3 Target Tab</h2>
      <div class="target_demo">
        <div id="tab1" class="tab_content">
          <p>斯德哥尔摩综合征(英语:Stockholm syndrome;瑞典语:Stockholmssyndromet)又称为人质情结、人质综合症,是指犯罪的被害者对于加害者产生情感,甚至反过来帮助加害者的一种情结。</p>
        <div id="tab2" class="tab_content">
        <div id="tab3" class="tab_content">
           <div id="tab4" class="tab_content">
        <ul class="tabs">
          <li><a href="#tab1">Tab1</a></li>
          <li><a href="#tab2">Tab2</a></li>
          <li><a href="#tab3">Tab3</a></li>
          <li><a href="#tab4">Tab4</a></li>


                .tabs {
	position: absolute;
	bottom: 100%;
	left: 0;
	/*z-index: 2;*/
.tabs:after {
	visibility: hidden;
	display: block;
	font-size: 0;
	content: " ";
	clear: both;
	height: 0;
.tabs li {
	display: inline-block;
	margin-left: -1px;
.tabs li a {
	padding: 4px 10px;
	background: #fff;
	border: 1px solid #ccc;
	background: -moz-linear-gradient(top, #fff, #eee);
	background:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#eee));
	text-decoration: none;
.tabs li a:hover{text-decoration:none;}
.target_demo {
	margin: 0 0 120px 0;
	position: relative;
	margin-top: 150px;
	min-height: 300px;
.target_demo .tab_content {
	border: 1px solid #ccc;
	background: #fff;
	padding: 20px;
	min-height: 250px;
	position: absolute;
	top: -1px;
	left: 0;
#tab1:target, #tab2:target, #tab3:target {
	z-index: 1;
#tab1:target ~ .tabs li a[href="#tab1"], #tab2:target ~ .tabs a[href="#tab2"], #tab3:target ~ .tabs a[href="#tab3"] {