CSS/gifu/tab

From 2014.igem.org

(Difference between revisions)
Line 9: Line 9:
<style type="text/css">
<style type="text/css">
-
body {
+
body,
-
    background: #000000;}
+
html {
-
.tabs {
+
margin: 0;
-
    position: relative;
+
padding:10px;
-
    padding: 0;
+
-webkit-font-smoothing: antialiased;
-
margin-left:auto;  
+
font-weight: 100;
-
    margin-right:auto;  
+
background: #f0f8ff;
 +
text-align: center;
 +
font-family: helvetica;
}
}
-
.tabs li {
+
 
-
    list-style: none;
+
/* 画像 */
-
    display:inline-block;
+
 
 +
img {
 +
max-width: 100%;
 +
height: auto;
}
}
-
.tabs input[type=radio] {
 
-
    display: none;
 
 +
/* タブ */
 +
.tabs input[type=radio] {
 +
position: absolute;
 +
top: -9999px;
 +
left: -9999px;
}
}
 +
 +
.tabs {
 +
max-width: 650px;
 +
height: 400px;
 +
float: none;
 +
list-style: none;
 +
position: relative;
 +
padding: 0;
 +
margin: 75px auto;
 +
}
 +
 +
.tabs li { float: left; }
 +
.tabs label {
.tabs label {
-
    display: block;
+
display: block;
-
    cursor: pointer;
+
padding: 10px 20px;
-
    padding: 5px;
+
border-radius: 2px 2px 0 0;
-
    line-height: 20px;
+
color: #08C;
-
    background-color: #999999;
+
font-size: 24px;
-
    color: #ffffff;
+
font-weight: normal;
 +
font-family: ‘Lily Script One’, helveti;
 +
background: rgba(255,255,255,0.2);
 +
cursor: pointer;
 +
position: relative;
 +
top: 3px;
 +
-webkit-transition: all 0.2s ease-in-out;
 +
-moz-transition: all 0.2s ease-in-out;
 +
-o-transition: all 0.2s ease-in-out;
 +
transition: all 0.2s ease-in-out;
}
}
 +
.tabs label:hover {
.tabs label:hover {
-
    background-color: #cccccc;
+
background: rgba(255,255,255,0.5);
-
    color: #000000;
+
top: 0;
}
}
-
.tabs input[type=radio]:checked + label {
+
 
-
    background-color: #ffffff;
+
[id^=tab]:checked + label {
-
    color: #000000;
+
background: #08C;
 +
color: white;
 +
top: 0;
}
}
-
.tabs .contents {
+
[id^=tab]:checked ~ [id^=tab-content] {
-
    display: none;
+
display: block;
-
    position: absolute;
+
-
    top:30px;
+
-
    left: 0;
+
-
    padding: 10px;
+
-
    background: #f0f8ff;
+
-
}
+
-
.tabs input[type=radio]:checked + label + .contents{
+
-
    display: block;
+
}
}
 +
.tab-content {
 +
z-index: 2;
 +
display: none;
 +
text-align: left;
 +
width: 100%;
 +
height: 300px;
 +
overflow-y: auto;
 +
font-size: 20px;
 +
line-height: 140%;
 +
padding-top: 10px;
 +
background: #08C;
 +
padding: 15px;
 +
color: white;
 +
position: absolute;
 +
top: 53px;
 +
left: 0;
 +
box-sizing: border-box;
 +
-webkit-animation-duration: 0.5s;
 +
-o-animation-duration: 0.5s;
 +
-moz-animation-duration: 0.5s;
 +
animation-duration: 0.5s;
 +
}

Revision as of 01:53, 2 September 2014