Template:Team:KIT-Kyoto/mobile

From 2014.igem.org

(Difference between revisions)
Line 2: Line 2:
<head>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
<meta name="viewport" content="width=device-width; initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
 +
<script type="text/javascript">
 +
$(function(){
 +
    var ua = navigator.userAgent;
 +
if(ua.indexOf('iPhone') > 0 || ua.indexOf('Android') > 0 || ua.indexOf('BlackBerry') > 0 || ua.indexOf('Windows Phone') > 0){
 +
$(".accordion label").click(function(){
 +
$(".ac").animate({'height':'auto'},'slow','swing');
 +
        $(".accordion h2::after").css({'margin-top':'-3px','-webkit-transform':'rotate(-45deg)','transform':'rotate(-45deg)'});
 +
}
 +
});
 +
</script>
<style type="text/css">
<style type="text/css">
.accordion input{
.accordion input{
Line 80: Line 90:
z-index:10;
z-index:10;
}
}
-
.accordion label {
+
.accordion h2 {
position: relative;
position: relative;
display: block;
display: block;
cursor: pointer;
cursor: pointer;
}
}
-
.accordion label::after {
+
.accordion h2::after {
position: absolute;
position: absolute;
top: 50%;
top: 50%;
Line 103: Line 113:
height: 0;
height: 0;
overflow: hidden;
overflow: hidden;
-
transition: height 0.4s ease-in-out;
 
-
}
 
-
 
-
.accordion input:checked ~ label::after {
 
-
margin-top: -3px;
 
-
-webkit-transform: rotate(-45deg);
 
-
transform: rotate(-45deg);
 
-
}
 
-
.accordion input:checked ~ div.ac {
 
-
        height:auto;
 
-
border-bottom: 1px solid #ccc;
 
}
}

Revision as of 18:19, 21 September 2014