Pure CSS3 Cycle Slider
Вставляем в шаблон блога:
<style>
/* ANIMATION */
@-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; }
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>
</style>
<style>
@import url("reset.css") screen;
@import url("animation.css") screen;
/* Common */
html, body {
background:#eaeaea url(../img/bg.png) repeat;
font-size:12px;
font-family:"Open Sans", serif;
min-width:960px;
margin:0;
padding:0;
color:#aaa;
}
.content h1 {
font-size:48px;
color:#000;
text-shadow:0px 1px 1px #f4f4f4;
text-align:center;
padding:60px 0 30px;
}
/* LAYOUT */
.container {
margin:0 auto;
overflow:hidden;
width:960px;
}
/* CONTENT SLIDER */
#content-slider {
width:100%;
height:360px;
margin:10px auto 0;
}
/* SLIDER */
#slider {
background:#000;
border:5px solid #eaeaea;
box-shadow:1px 1px 5px rgba(0,0,0,0.7);
height:320px;
width:680px;
margin:40px auto 0;
overflow:visible;
position:relative;
}
#mask {
overflow:hidden;
height:320px;
}
#slider ul {
margin:0;
padding:0;
position:relative;
}
#slider li {
width:680px;
height:320px;
position:absolute;
top:-325px;
list-style:none;
}
#slider li.firstanimation {
-moz-animation:cycle 25s linear infinite;
-webkit-animation:cycle 25s linear infinite;
}
#slider li.secondanimation {
-moz-animation:cycletwo 25s linear infinite;
-webkit-animation:cycletwo 25s linear infinite;
}
#slider li.thirdanimation {
-moz-animation:cyclethree 25s linear infinite;
-webkit-animation:cyclethree 25s linear infinite;
}
#slider li.fourthanimation {
-moz-animation:cyclefour 25s linear infinite;
-webkit-animation:cyclefour 25s linear infinite;
}
#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;
height:60px;
position:relative;
bottom:75px;
left:-320px;
-moz-transition:all 0.3s ease-in-out;
-webkit-transition:all 0.3s ease-in-out;
}
#slider .tooltip h1 {
color:#fff;
font-size:24px;
font-weight:300;
line-height:60px;
padding:0 0 0 20px;
}
#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;
}
#slider:hover li,
#slider:hover .progress-bar {
-moz-animation-play-state:paused;
-webkit-animation-play-state:paused;
}
/* PROGRESS BAR */
.progress-bar {
position:relative;
top:-5px;
width:680px;
height:5px;
background:#000;
-moz-animation:fullexpand 25s ease-out infinite;
-webkit-animation:fullexpand 25s ease-out infinite;
}
</style>
Вставляем в поле сообщения:<div class="content">
<h1>Pure CSS3 Cycle Slider</h1>
</div>
<div class="container">
<div id="content-slider">
<div id="slider">
<div id="mask">
<ul>
<li class="firstanimation" id="first">
<a href="#">
<img alt="Cougar" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtwuN5LaZjhHWWpFeuo9-3ZI-YVQcKDxhzGImWRX6UhUKFX1Rh5kJL4GElPC9i_XBSKDPMnG7IY0zlaYpN6DtJFA4vRQSo7HwbPPSVjQDumoyLbls8m6kbk-naHIGO5TdWUrjMJHHan7WY7vS1fxjMUwdkFIx53PS778L8vCedrJOMdh7QMBwd-gTgVBg/s16000/_DSC7751_20.jpg" />
</a>
<div class="tooltip">
<h1>Nymphaea</h1>
</div>
</li>
<li class="secondanimation" id="second">
<a href="#">
<img alt="Lions" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJye57EAkRfvNeGZa595ykIWXwzlekrtcAZIUjvR05l8QpUmC0Zea132ALN7Qdjl6Lul1rL-vFxEpzzTTvcO5BVwNZ9CjC4WRHww4Md1GAIIVYLuQk88FwvoVjmO1T9t9r9oXRSfjLhyphenhyphenggFMtJbR6VrY5aCu90tgBzWLZH-YfE3pF6qC3r96o3sBbvejA/s16000/_DSC7767_20.jpg" />
</a>
<div class="tooltip">
<h1>Nymphaea</h1>
</div>
</li>
<li class="thirdanimation" id="third">
<a href="#">
<img alt="Snowalker" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgL1zANB0CyoDkWlji6-3nZAinHwaH3d82Dkc8KD-pMY8xOhyphenhyphen1XG_DfO_Ig9_pv7BIqPRRztydoCD_TKMzs98ak2UTUC2bZ-b2V0uO4I-PmjW1Kt7BxOUPEcRTyytOmArjCl2H9C6Z7EXYJwP87LZ3RX4Lg-pvQYkCStYoSKm2_j6N2KopVV2gCkrqQJqY/s16000/_DSC7779_20.jpg" />
</a>
<div class="tooltip">
<h1>Nymphaea</h1>
</div>
</li>
<li class="fourthanimation" id="fourth">
<a href="#">
<img alt="Howling" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgildgG4B2ijRagwEiGrGk0pZ0UREj3KoKTz9s60pPwojj0bhah6PWE-LtT-RJU2rL1yxVsulULS8_SbWQU7u2f6pWDpzH2pzUatIwuDsq8LLl8019irofGBGl4amLrYLw1uMjqxzi3JRpBmntiCeTqqcwPwfb21xN1EAjDaYh-NYrPw0ocsRhILamY8zc/s16000/_DSC7830_20.jpg" />
</a>
<div class="tooltip">
<h1>Nymphaea</h1>
</div>
</li>
<li class="fifthanimation" id="fifth">
<a href="#">
<img alt="Sunbathing" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgE7wlAGb5BXnwoC4NVhh-cif1fW58S10pXnwN8edfX29piDl_6qgRzMp7GLdhXG5cdvyM_lbAoP65CT30H1t8SJaP0rtqZL-zWLnZpnjrE0cXESnx4GnBy_bwQAjknCCS1HIbaPBGl0p9PXReQPJ2GiyJNXq3o96JWHb-PJ1wolIlkQn2HQGp8cVA5nNY/s16000/_DSC7911_20.jpg" />
</a>
<div class="tooltip">
<h1>Nymphaea</h1>
</div>
</li>
</ul>
</div>
<div class="progress-bar"></div>
</div>
</div>
</div><p>







Комментариев нет:
Отправить комментарий