Vektorpate
Threadersteller
Dabei seit: 05.09.2006
Ort: Hamburg
Alter: -
Geschlecht:
|
Verfasst Mi 08.08.2012 18:06
Titel CSS3 image hover |
|
|
Hey,
ich habe eine Frage bezüglich image hover per CSS3.
Ich habe einen Div mit Klasse .hs-wrapper, über welchen ich
mehrere Bilder per Mouseover ein- und aublenden lasse.
Meine Frage nun: wie könnte ich es per CSS regeln, dass
sobald man mit der Maus wieder vom Div weggeht, auch wieder
das erstgezeigte Bild angezeigt wird?
Über Rat wäre ich sehr dankbar!
Code: | .hs-wrapper {
width:270px;
height:173px;
overflow: hidden;
position: relative;
}
.hs-wrapper img{
top: 0px;
left: 0px;
position: absolute;
animation: showMe 5s linear infinite 0s forwards;
animation-play-state: paused;
}
.hs-wrapper img:nth-child(1){
z-index: 9;
}
.hs-wrapper img:nth-child(2){
animation-delay: 1s;
z-index: 8;
}
.hs-wrapper img:nth-child(3){
animation-delay: 2s;
z-index: 7;
}
.hs-wrapper img:nth-child(4){
animation-delay: 3s;
z-index: 6;
}
.hs-wrapper img:nth-child(5){
animation-delay: 4s;
z-index: 5;
}
.hs-wrapper:hover img{
animation-play-state: running;
}
@keyframes showMe {
0% { visibility: visible; z-index: 100; }
12.5% { visibility: visible; z-index: 100; }
25% { visibility: hidden; z-index: 0; }
100% { visibility: hidden; z-index: 0; }
}
|
|
|