cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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.

            
              <div>
	<ul class="nav01">
		<li><a href="#" data-text="ホーム">Home</a></li>
		<li><a href="#" data-text="会社概要">About</a></li>
		<li><a href="#" data-text="実績紹介">Works</a></li>
		<li><a href="#" data-text="ブログ">Blog</a></li>
		<li><a href="#" data-text="お問い合わせ">Contact</a></li>
	</ul>
</div>
<div>
	<ul class="nav02">
		<li><a href="#" data-hover="ホーム">Home</a></li>
		<li><a href="#" data-hover="会社概要">About</a></li>
		<li><a href="#" data-hover="実績紹介">Works</a></li>
		<li><a href="#" data-hover="ブログ">Blog</a></li>
		<li><a href="#" data-hover="お問い合わせ">Contact</a></li>
	</ul>
</div>
<div>
	<ul class="nav03">
		<li><a href="#" data-hover="ホーム"><span >Home</span></a></li>
		<li><a href="#" data-hover="会社概要"><span>About</span></a></li>
		<li><a href="#" data-hover="実績紹介"><span >Works</span></a></li>
		<li><a href="#" data-hover="ブログ"><span>Blog</span></a></li>
		<li><a href="#" data-hover="お問い合わせ"><span>Contact</span></a></li>
	</ul>
</div>
<div>
	<ul class="nav04">
		<li><a href="#" data-hover="ホーム"><span >Home</span></a></li>
		<li><a href="#" data-hover="会社概要"><span>About</span></a></li>
		<li><a href="#" data-hover="実績紹介"><span >Works</span></a></li>
		<li><a href="#" data-hover="ブログ"><span>Blog</span></a></li>
		<li><a href="#" data-hover="お問い合わせ"><span>Contact</span></a></li>
	</ul>
</div>
<div>
	<ul class="nav05">
		<li><a href="#" data-hover="ホーム"><span >Home</span></a></li>
		<li><a href="#" data-hover="会社概要"><span>About</span></a></li>
		<li><a href="#" data-hover="実績紹介"><span >Works</span></a></li>
		<li><a href="#" data-hover="ブログ"><span>Blog</span></a></li>
		<li><a href="#" data-hover="お問い合わせ"><span>Contact</span></a></li>
	</ul>
</div>
<div>
	<ul class="nav06">
		<li><a href="#" data-hover="Home">Home</a></li>
		<li><a href="#" data-hover="About">About</a></li>
		<li><a href="#" data-hover="Works">Works</a></li>
		<li><a href="#" data-hover="Blog">Blog</a></li>
		<li><a href="#" data-hover="Contact">Contact</a></li>
	</ul>
</div>
            
          
!
            
              * {
	margin: 0;
	padding: 0;
}
div {
	padding: 100px 0;
}
div:nth-of-type(even) {
	background-color: #f0f0f0;
}



/* nav01 */
.nav01 {
	list-style: none;
	text-align: center;
}
.nav01 li {
	display: inline-block;
	margin: 0 1em;
}
.nav01 li a {
	display: inline-block;
	padding: .2em 1em;
	color: #333;
	font-family: 'Open Sans', sans-serif;
	font-weight: 400;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
}
.nav01 li a::after {
	content: attr(data-text);
	display: block;
	margin-top: .7em;
	color: #aaa;
	font-size: 11px;
}

/* nav02 */
.nav02 {
	list-style: none;
	text-align: center;
}
.nav02 li {
	display: inline-block;
	margin: 0 1.5em;
}
.nav02 li a {
	position: relative;
	display: inline-block;
	padding: .2em .5em;
	color: #333;
	font-family: 'Open Sans', sans-serif;
	font-weight: 400;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
}
.nav02 li a::after,
.nav02 li a::before {
	position: absolute;
	transition: .3s ease-in-out;
	opacity: 0;
}
.nav02 li a::after {
	top: 26px;
	left: 0;
	content: attr(data-hover);
	display: block;
	width: 100%;
	padding: .6em 0 .9em;
	background-color: rgba(0, 0, 0, .5);
	border-radius: 4px;
	color: #fff;
	font-size: 11px;
}
.nav02 li a::before {
	top: 10px;
	left: 50%;
	content: '';
	margin-left: -8px;
	border: 8px solid transparent;
	border-bottom-color: rgba(0, 0, 0, .5);
}
.nav02 li a:hover::before,
.nav02 li a:focus::before {
	top: 18px;
	opacity: 1;
}
.nav02 li a:hover::after,
.nav02 li a:focus::after {
	top: 34px;
	opacity: 1;
}

/* nav03 */
.nav03 {
	list-style: none;
	text-align: center;
}
.nav03 li {
	display: inline-block;
	margin: 0 1em;
}
.nav03 li a {
	position: relative;
	display: inline-block;
	padding: .2em 1em;
	color: #333;
	font-family: 'Open Sans', sans-serif;
	font-weight: 400;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
}
.nav03 li a::after {
	position: absolute;
	top: 0;
	left: 0;
	content: attr(data-hover);
	display: block;
	width: 100%;
	padding: .2em 0;
	transition: .3s ease-in-out;
	opacity: 0;
}
.nav03 li a span {
	display: inline-block;
	transition: .3s ease-in-out;
}
.nav03 li a:hover::after,
.nav03 li a:focus::after {
	opacity: 1;
}
.nav03 li a:hover span,
.nav03 li a:focus span {
	opacity: 0;
}


/* nav04 */
.nav04 {
	list-style: none;
	text-align: center;
}
.nav04 li {
	display: inline-block;
	margin: 0 1em;
}
.nav04 li a {
	position: relative;
	display: inline-block;
	padding: .2em 1em;
	color: #333;
	font-family: 'Open Sans', sans-serif;
	font-weight: 400;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	overflow: hidden;
}
.nav04 li a::after {
	position: absolute;
	top: 0;
	left: 0;
	content: attr(data-hover);
	display: block;
	width: 100%;
	padding: .2em 0;
	transition: .3s ease-in-out;
	transform: translateY(-1.4em);
}
.nav04 li a span {
	display: inline-block;
	transition: .3s ease-in-out;
}
.nav04 li a:hover::after,
.nav04 li a:focus::after {
	transform: translateY(0);
}
.nav04 li a:hover span,
.nav04 li a:focus span {
	transform: translateY(1.4em);
}

/* nav05 */
.nav05 {
	list-style: none;
	text-align: center;
}
.nav05 li {
	display: inline-block;
	margin: 0 1em;
}
.nav05 li a {
	position: relative;
	display: inline-block;
	padding: .2em 1em;
	color: #333;
	font-family: 'Open Sans', sans-serif;
	font-weight: 400;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	overflow: hidden;
}
.nav05 li a::after {
	position: absolute;
	top: 0;
	left: 0;
	content: attr(data-hover);
	display: block;
	width: 100%;
	padding: .2em 0;
	transition: .3s ease-in-out;
	transform: translateY(1.4em);
}
.nav05 li a span {
	display: inline-block;
	transition: .3s ease-in-out;
}
.nav05 li a:hover::after,
.nav05 li a:focus::after {
	transform: translateY(0);
}
.nav05 li a:hover span,
.nav05 li a:focus span {
	transform: translateY(1.4em);
}

/* nav06 */
.nav06 {
	list-style: none;
	text-align: center;
}
.nav06 li {
	display: inline-block;
	margin: 0 2em;
}
.nav06 li a {
	position: relative;
	display: inline-block;
	padding: .2em 0;
	color: #333;
	font-family: 'Open Sans', sans-serif;
	font-weight: 400;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
}
.nav06 li a::after {
	position: absolute;
	top: 0;
	left: 0;
	content: attr(data-hover);
	display: block;
	width: 0;
	padding: .2em 0;
	color: #aaa;
	transition: .3s ease-in-out;
	overflow: hidden;
}
.nav06 li a:hover::after,
.nav06 li a:focus::after {
	width: 100%;
}
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console