Template:CSS/js-image-slider
From 2014.igem.org
(Difference between revisions)
(47 intermediate revisions not shown) | |||
Line 2: | Line 2: | ||
<style rel='stylesheet' type='text/css'> | <style rel='stylesheet' type='text/css'> | ||
- | + | /* Common */ | |
- | { | + | |
- | + | ||
- | + | .slider2{ | |
- | + | width:1032px; | |
+ | height:384px; | ||
+ | position:absolute; | ||
+ | left:300px; | ||
+ | top:96px; | ||
+ | |||
} | } | ||
- | + | ||
- | + | ||
+ | /* LAYOUT */ | ||
+ | .container3 { | ||
+ | margin:0 auto; | ||
+ | overflow:hidden; | ||
+ | width:1032px; | ||
+ | height:384px; | ||
+ | position:absolute; | ||
+ | top:0px; | ||
+ | left:0px; | ||
} | } | ||
+ | /* CONTENT SLIDER */ | ||
+ | #content-slider { | ||
+ | width:100%; | ||
+ | height:384px; | ||
+ | position:absolute; | ||
+ | top:0px; | ||
+ | left:0px; | ||
+ | |||
+ | } | ||
+ | /* SLIDER */ | ||
#slider { | #slider { | ||
- | + | ||
- | + | ||
- | margin: | + | height:384px; |
- | + | width:1032px; | |
- | + | margin:40px auto 0; | |
+ | overflow:hidden; | ||
+ | position:absolute; | ||
+ | top:-50px; | ||
+ | left:0px; | ||
+ | |||
} | } | ||
+ | #mask { | ||
+ | overflow:hidden; | ||
+ | height:384px; | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
} | } | ||
- | #slider | + | #slider ul { |
- | + | margin:0; | |
+ | padding:0; | ||
+ | position:relative; | ||
} | } | ||
- | + | #slider li { | |
- | + | width:1032px; | |
- | #slider | + | height:384px; |
position:absolute; | position:absolute; | ||
- | + | list-style:none; | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
} | } | ||
- | #slider | + | |
- | { | + | #slider li.firstanimation { |
- | + | -moz-animation:cycle 25s linear infinite; | |
- | + | -webkit-animation:cycle 25s linear infinite; | |
} | } | ||
- | #slider | + | #slider li.secondanimation { |
- | + | -moz-animation:cycletwo 25s linear infinite; | |
+ | -webkit-animation:cycletwo 25s linear infinite; | ||
} | } | ||
- | #slider | + | #slider li.thirdanimation { |
- | + | -moz-animation:cyclethree 25s linear infinite; | |
- | + | -webkit-animation:cyclethree 25s linear infinite; | |
- | + | ||
- | + | ||
- | + | ||
} | } | ||
- | #slider | + | #slider li.fourthanimation { |
- | + | -moz-animation:cyclefour 25s linear infinite; | |
+ | -webkit-animation:cyclefour 25s linear infinite; | ||
} | } | ||
- | #slider | + | #slider li.fifthanimation { |
- | + | -moz-animation:cyclefive 25s linear infinite; | |
+ | -webkit-animation:cyclefive 25s linear infinite; | ||
} | } | ||
- | + | #slider .tooltip { | |
- | + | background:rgba(0,0,0,0.7); | |
- | + | width:300px; | |
- | #slider | + | height:60px; |
- | + | ||
- | + | ||
- | + | ||
position:relative; | position:relative; | ||
- | + | bottom:75px; | |
+ | left:-320px; | ||
+ | -moz-transition:all 1s ease-in-out; | ||
+ | -webkit-transition:all 1s ease-in-out; | ||
} | } | ||
- | + | #slider .tooltip h1 { | |
- | + | color:#fff; | |
- | #slider | + | font-size:24px; |
- | { | + | font-weight:300; |
- | + | line-height:30px; | |
- | + | padding:0 0 0 0px; | |
- | + | } | |
- | + | #slider li#first:hover .tooltip, | |
- | + | #slider li#second:hover .tooltip, | |
- | + | #slider li#third:hover .tooltip, | |
+ | #slider li#fourth:hover .tooltip, | ||
+ | #slider li#fifth:hover .tooltip { | ||
+ | left:0px; | ||
} | } | ||
- | |||
+ | /* PROGRESS BAR */ | ||
+ | .progress-bar { | ||
+ | position:relative; | ||
+ | top:-5px; | ||
+ | width:680px; | ||
+ | height:5px; | ||
+ | background:#000; | ||
+ | border-radius:8px; | ||
+ | -moz-animation:fullexpand 25s ease-out infinite; | ||
+ | -webkit-animation:fullexpand 25s ease-out infinite; | ||
+ | } | ||
- | |||
- | + | @-moz-keyframes cycle { | |
- | { | + | 0% { top:0px; } |
- | + | 4% { top:0px; } | |
- | + | 16% { top:0px; opacity:1; z-index:0; } | |
- | + | 20% { top:325px; opacity:0; z-index:0; } | |
- | + | 21% { top:-325px; opacity:0; z-index:-1; } | |
- | + | 92% { top:-325px; opacity:0; z-index:0; } | |
- | + | 96% { top:-325px; opacity:0; } | |
- | + | 100%{ top:0px; opacity:1; } | |
- | + | ||
} | } | ||
- | + | @-moz-keyframes cycletwo { | |
- | + | 0% { top:-325px; opacity:0; } | |
- | + | 16% { top:-325px; opacity:0; } | |
+ | 20% { top:0px; opacity:1; } | ||
+ | 24% { top:0px; opacity:1; } | ||
+ | 36% { top:0px; opacity:1; z-index:0; } | ||
+ | 40% { top:325px; opacity:0; z-index:0; } | ||
+ | 41% { top:-325px; opacity:0; z-index:-1; } | ||
+ | 100%{ top:-325px; opacity:0; z-index:-1; } | ||
+ | } | ||
+ | @-moz-keyframes cyclethree { | ||
+ | 0% { top:-325px; opacity:0; } | ||
+ | 36% { top:-325px; opacity:0; } | ||
+ | 40% { top:0px; opacity:1; } | ||
+ | 44% { top:0px; opacity:1; } | ||
+ | 56% { top:0px; opacity:1; } | ||
+ | 60% { top:325px; opacity:0; z-index:0; } | ||
+ | 61% { top:-325px; opacity:0; z-index:-1; } | ||
+ | 100%{ top:-325px; opacity:0; z-index:-1; } | ||
+ | } | ||
+ | @-moz-keyframes cyclefour { | ||
+ | 0% { top:-325px; opacity:0; } | ||
+ | 56% { top:-325px; opacity:0; } | ||
+ | 60% { top:0px; opacity:1; } | ||
+ | 64% { top:0px; opacity:1; } | ||
+ | 76% { top:0px; opacity:1; z-index:0; } | ||
+ | 80% { top:325px; opacity:0; z-index:0; } | ||
+ | 81% { top:-325px; opacity:0; z-index:-1; } | ||
+ | 100%{ top:-325px; opacity:0; z-index:-1; } | ||
+ | } | ||
+ | @-moz-keyframes cyclefive { | ||
+ | 0% { top:-325px; opacity:0; } | ||
+ | 76% { top:-325px; opacity:0; } | ||
+ | 80% { top:0px; opacity:1; } | ||
+ | 84% { top:0px; opacity:1; } | ||
+ | 96% { top:0px; opacity:1; z-index:0; } | ||
+ | 100%{ top:325px; opacity:0; z-index:0; } | ||
} | } | ||
- | + | @-webkit-keyframes cycle { | |
- | + | 0% { top:0px; } | |
- | -webkit- | + | 4% { top:0px; } |
- | + | 16% { top:0px; opacity:1; z-index:0; } | |
+ | 20% { top:325px; opacity:0; z-index:0; } | ||
+ | 21% { top:-325px; opacity:0; z-index:-1; } | ||
+ | 50% { top:-325px; opacity:0; z-index:-1; } | ||
+ | 92% { top:-325px; opacity:0; z-index:0; } | ||
+ | 96% { top:-325px; opacity:0; } | ||
+ | 100%{ top:0px; opacity:1; } | ||
+ | |||
+ | } | ||
+ | @-webkit-keyframes cycletwo { | ||
+ | 0% { top:-325px; opacity:0; } | ||
+ | 16% { top:-325px; opacity:0; } | ||
+ | 20% { top:0px; opacity:1; } | ||
+ | 24% { top:0px; opacity:1; } | ||
+ | 36% { top:0px; opacity:1; z-index:0; } | ||
+ | 40% { top:325px; opacity:0; z-index:0; } | ||
+ | 41% { top:-325px; opacity:0; z-index:-1; } | ||
+ | 100%{ top:-325px; opacity:0; z-index:-1; } | ||
+ | } | ||
+ | @-webkit-keyframes cyclethree { | ||
+ | 0% { top:-325px; opacity:0; } | ||
+ | 36% { top:-325px; opacity:0; } | ||
+ | 40% { top:0px; opacity:1; } | ||
+ | 44% { top:0px; opacity:1; } | ||
+ | 56% { top:0px; opacity:1; z-index:0; } | ||
+ | 60% { top:325px; opacity:0; z-index:0; } | ||
+ | 61% { top:-325px; opacity:0; z-index:-1; } | ||
+ | 100%{ top:-325px; opacity:0; z-index:-1; } | ||
+ | } | ||
+ | @-webkit-keyframes cyclefour { | ||
+ | 0% { top:-325px; opacity:0; } | ||
+ | 56% { top:-325px; opacity:0; } | ||
+ | 60% { top:0px; opacity:1; } | ||
+ | 64% { top:0px; opacity:1; } | ||
+ | 76% { top:0px; opacity:1; z-index:0; } | ||
+ | 80% { top:325px; opacity:0; z-index:0; } | ||
+ | 81% { top:-325px; opacity:0; z-index:-1; } | ||
+ | 100%{ top:-325px; opacity:0; z-index:-1; } | ||
+ | } | ||
+ | @-webkit-keyframes cyclefive { | ||
+ | 0% { top:-325px; opacity:0; } | ||
+ | 76% { top:-325px; opacity:0; } | ||
+ | 80% { top:0px; opacity:1; } | ||
+ | 84% { top:0px; opacity:1; } | ||
+ | 96% { top:0px; opacity:1; z-index:0; } | ||
+ | 100%{ top:325px; opacity:0; z-index:0; } | ||
} | } | ||
- | + | /* ANIMATION BAR */ | |
+ | @-moz-keyframes fullexpand { | ||
+ | 0%, 20%, 40%, 60%, 80%, 100% { width:0%; opacity:0; } | ||
+ | 4%, 24%, 44%, 64%, 84% { width:0%; opacity:0.3; } | ||
+ | 16%, 36%, 56%, 76%, 96% { width:100%; opacity:0.7; } | ||
+ | 17%, 37%, 57%, 77%, 97% { width:100%; opacity:0.3; } | ||
+ | 18%, 38%, 58%, 78%, 98% { width:100%; opacity:0; } | ||
+ | } | ||
+ | @-webkit-keyframes fullexpand { | ||
+ | 0%, 20%, 40%, 60%, 80%, 100% { width:0%; opacity:0; } | ||
+ | 4%, 24%, 44%, 64%, 84% { width:0%; opacity:0.3; } | ||
+ | 16%, 36%, 56%, 76%, 96% { width:100%; opacity:0.7; } | ||
+ | 17%, 37%, 57%, 77%, 97% { width:100%; opacity:0.3; } | ||
+ | 18%, 38%, 58%, 78%, 98% { width:100%; opacity:0; } | ||
+ | } | ||
</style> | </style> | ||
</html> | </html> |
Latest revision as of 11:15, 13 September 2014