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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

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.

HTML

            
              	<h1>Demo for 7 javascript-effect alternatives using CSS 3 for webkit browsers</h1>

	<h3>Effect 1: Fade Block</h3>
	<div id="fade" class="block">Vui Lòng Di Chuyển Chuột vào Để Trải Nghiệm Hiệu Hứng!</div>

	<br><br>

	<h3>Effect 2: Pulsate Block</h3>
	<div id="pulsate" class="block">Vui Lòng Di Chuyển Chuột vào Để Trải Nghiệm Hiệu Hứng!</div>

	<br><br>

	<h3>Effect 3: Nudge</h3>
	<div id="nudge" class="block">Đặt chuột vào tôi văn bản sẽ thay đổi</div>

	<br><br>

	<h3>Effect 4: Expand Block</h3>
	<div id="expand" class="block">Đặt chuột lên tôi đường viền sẽ mở rộng</div>

	<br><br>

	<h3>Effect 5: Bounce Block</h3>
	<div id="bounce" class="block">Đặt chuột lên tôi tôi sẽ nảy!</div>

	<br><br>

	<h3>Effect 6: Spin Block</h3>
	<div id="spin" class="block">Đặt chuột lên tôi tôi sẽ quay</div>

	<br><br>

	<h3>Effect 7: Accordion</h3>
	<div id="accordion" class="accordion">
		<a href="#first">Click on Tab 1</a>
		<div id="first">
			<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
				magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
				consequat. </p>
		</div>
		<a href="#second">Click on Tab 2</a>
		<div id="second">
			<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
				magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
				consequat. </p>
		</div>
		<a href="#third">Click on Tab 3</a>
		<div id="third">
			<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
				magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
				consequat. </p>
		</div>
	</div>
            
          
!

CSS

            
              body {
			width: 950px;
			margin: 0 auto;
			font-family: 'Times New Roman', Times, serif;
			text-align: left
		}

		.block {
			border: 5px solid #ccc;
			padding: 10px;
			-webkit-border-radius: 5px;
		}

		.accordion a {
			display: block;
			padding: 5px 10px;
			background-color: #333;
			color: #eee;
			text-decoration: none
		}

		.accordion a:hover {
			background-color: #999
		}

		.accordion div {
			background-color: #ccc;
			color: #222;
		}

		.accordion div p {
			padding: 20px
		}

		#bounce {
			width: 200px;
		}

		#pulsate {
			width: 200px;
			height: 100px;
		}

		.clear {
			clear: both;
		}

		#fade {
			opacity: 1;
			-webkit-transition: opacity 1s linear;
		}

		#fade:hover {
			opacity: 0;
		}

		#pulsate:hover {
			-webkit-animation-name: pulsate;
			-webkit-animation-duration: 20s;
			-webkit-animation-timing-function: ease-in-out;
		}

		@-webkit-keyframes pulsate {
			0% {
				width: 140px;
			}

			5% {
				width: 190px;
				left: -25px;
			}

			10% {
				width: 140px;
				left: 0px;
			}

			15% {
				width: 190px;
				left: -25px;
			}

			20% {
				width: 140px;
				left: 0px;
			}

			40% {
				width: 140px;
			}

			45% {
				width: 190px;
				left: -25px;
			}

			50% {
				width: 140px;
				left: 0px;
			}

			55% {
				width: 190px;
				left: -25px;
			}

			60% {
				width: 140px;
				left: 0px;
			}

			80% {
				width: 140px;
			}

			100% {
				width: 140px;
			}
		}

		#nudge {
			-webkit-transition-property: color, background-color, padding-left;
			-webkit-transition-duration: 500ms, 500ms, 500ms
		}

		#nudge:hover {
			background-color: #efefef;
			color: #333;
			padding-left: 50px
		}

		#expand {
			background-color: #eee;
			-webkit-transition: all 500ms linear;
			border: 10px solid black
		}

		#expand:hover {
			border: 30px solid #800
		}

		#bounce:hover {
			-webkit-animation-name: bounce;
			-webkit-animation-duration: 1s;
			-webkit-animation-iteration-count: 2;
			-webkit-animation-direction: alternate
		}

		@-webkit-keyframes bounce {
			from {
				margin-left: 0px;
			}

			to {
				margin-left: 250px;
			}
		}


		#spin {
			-webkit-transition: -webkit-transform 3s ease-in;
		}

		#spin:hover {
			-webkit-transform: rotate(360deg)
		}

		#accordion div {
			height: 0;
			overflow: hidden;
			-webkit-transition: height 600ms ease
		}

		#accordion div:target {
			height: 110px
		}
            
          
!

JS

            
              
            
          
!
999px

Console