我的目标是让图像在屏幕上停留大约10秒钟 - 不增加渐变持续时间(如果可能)。我曾尝试搞乱关键帧百分比,但我似乎无法做到正确。任何帮助将不胜感激。
.slider {
max-width: 300px;
height: 200px;
margin: 20px auto;
position: relative;
}
.slide1,.slide2,.slide3,.slide4,.slide5 {
position: absolute;
width: 100%;
height: 100%;
}
.slide1 {
background: url(http://media.dunkedcdn.com/assets/prod/40946/580x0-9_cropped_1371566801_p17tbs0rrjqdt1u4dnk94fe4b63.jpg)no-repeat center;
background-size: cover;
animation:fade 30s infinite;
-webkit-animation:fade 30s infinite;
}
.slide2 {
background: url(http://media.dunkedcdn.com/assets/prod/40946/580x0-9_cropped_1371565525_p17tbqpu0d69c21hetd77dh483.jpeg)no-repeat center;
background-size: cover;
animation:fade2 30s infinite;
-webkit-animation:fade2 30s infinite;
}
.slide3 {
background: url(http://media.dunkedcdn.com/assets/prod/40946/580x0-9_cropped_1371564896_p17tbq6n86jdo3ishhta3fv1i3.jpg)no-repeat center;
background-size: cover;
animation:fade3 30s infinite;
-webkit-animation:fade3 30s infinite;
}
@keyframes fade {
0%,
27% {
opacity: 1
}
33.333% {
opacity: 0
}
66.666% {
opacity: 0
}
100% {
opacity: 1
}
}
@keyframes fade2 {
0% {
opacity: 0
}
33.333%,
60% {
opacity: 1
}
66.666% {
opacity: 0
}
100% {
opacity: 0
}
}
@keyframes fade3 {
0% {
opacity: 0
}
33.333% {
opacity: 0
}
66.666%,
93% {
opacity: 1
}
100% {
opacity: 0
}
}

<div class='slider'>
<div class='slide1'></div>
<div class='slide2'></div>
<div class='slide3'></div>
</div>
&#13;
答案 0 :(得分:0)
"INSERT INTO `feedback` (name, email, feedback) VALUES ('".mysql_real_escape_string($name)."','".mysql_real_escape_string($email)."','".mysql_real_escape_string($feedback)."')"))
检查:jsFiddle