<div id="tab_area"> <dl id="contents01"> <dt><a href="#contents01">CONTENTS【01】</a></dt> <dd> <p><strong>CONTENTS【01】</strong></p> </dd> </dl> <dl id="contents02"> <dt><a href="#contents02" onFocus="tabon()">CONTENTS【02】</a></dt> <dd> <p><strong>CONTENTS【02】</strong></p> </dd> </dl> <dl id="contents03"> <dt><a href="#contents03" onFocus="tabon()">CONTENTS【03】</a></dt> <dd> <p><strong>CONTENTS【03】</strong></p> </dd> </dl> </div>
/* TabArea
-------------------------- */
#tab_area {
margin: 0 auto;
width: 540px;
height: 350px;
text-align: left;
position: relative;
}
#tab_area dl {
width: 540px;
height: 340px;
border: #777 1px solid;
position: absolute;
}
#tab_area dl dt {
top: 0;
width: 180px;
height: 40px;
position: absolute;
border-bottom: #777 1px solid;
z-index: 5;
}
#tab_area dl#contents02 dt {
border-left: #777 1px solid;
border-right: #777 1px solid;
}
#tab_area dl#contents01 dt {left: 0;}
#tab_area dl#contents02 dt {left: 180px;}
#tab_area dl#contents03 dt {left: 360px;}
#tab_area dl dt a {
width: 180px;
height: 40px;
line-height: 40px;
text-align: center;
display: block;
}
#tab_area dl dt a:hover {background: #999;}
#tab_area dl dd {
top: 41px;
left: 0;
height: 300px;
position: absolute;
opacity: 0;
overflow-y: auto;
}
#tab_area dl dd p {
padding: 10px 10px;
}
/* CSS3 TabAnimation
-------------------------- */
@-webkit-keyframes TabSwitch {
0% {background: #fff;}
100% {background: #777;}
}
#tab_area dl:target dt a {
-webkit-animation-name: TabSwitch;
-webkit-animation-duration: 1s;
-webkit-animation-iteration-count: 1;
color: #fff;
font-weight: bold;
background: #777;
}
@-webkit-keyframes ContentsSwitch {
0% {opacity: 0;}
100% {opacity: 1;}
}
#tab_area dl:target dd {
-webkit-animation-name: ContentsSwitch;
-webkit-animation-duration: 1.5s;
-webkit-animation-iteration-count: 1;
opacity: 1;
z-index: 15;
}
#tab_area dl.onlink dd{
opacity: 1;
}
#tab_area dl.onlink dt a {
-webkit-animation-name: TabSwitch;
-webkit-animation-duration: 1s;
-webkit-animation-iteration-count: 1;
color: #fff;
font-weight: bold;
background: #777;
}SyntaxHighlighter.all();
window.addEventListener("load", function(){
document.getElementById("contents01").className = "onlink";
}, false);
function tabon(){
document.getElementById("contents01").className = "";
}