photobanner不会在IE中滚动,但会在Chrome和Firefox中滚动。
我搜索了Google,无法弄清楚出了什么问题。
以下是该页面的链接:
http://www.uncg.edu/~cwdicken/IndProject/Index.html
* {margin: 0; padding: 0;}
body {
background: url('bg.jpg');
}
#container {
width: 1000px;
height: 500px;
overflow: hidden;
margin: 50px auto;
background: url('divback.jpg');
background-size:1000px 500px;
position:relative;
}
#header{
width: 800px;
margin: 50px auto;
}
#header h1 {
text-align: center;
font: 100 60px/1.5 Verdana, Geneva, sans-serif;
}
#header p {
font: 100 15px/1.5 Verdana, Geneva, sans-serif;
text-align: justify;
}
.photobanner {
height: 500px;
width: 3550px;
top:15%;
position:relative;
}
/*keyframe animations*/
.first {
-webkit-animation: bannermove 30s linear infinite;
-moz-animation: bannermove 30s linear infinite;
-ms-animation: bannermove 30s linear infinite;
-o-animation: bannermove 30s linear infinite;
animation: bannermove 30s linear infinite;
}
@-moz-keyframes bannermove {
0% {
margin-left: 0px;
}
100% {
margin-left: -2125px;
}
}
@-webkit-keyframes bannermove {
0% {
margin-left: 0px;
}
100% {
margin-left: -2125px;
}
}
@-ms-keyframes bannermove {
0% {
margin-left: 0px;
}
100% {
margin-left: -2125px;
}
}
@-o-keyframes bannermove {
0% {
margin-left: 0px;
}
100% {
margin-left: -2125px;
}
}
@keyframes bannermove {
0% {
margin-left: 0px;
}
100% {
margin-left: -2125px;
}
}
.photobanner {
height: 233px;
width: 3550px;
margin-bottom: 50px;
}
.photobanner img {
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
-ms-transition: all 0.5s ease;
transition: all 0.5s ease;
}
.photobanner img:hover {
-webkit-transform: rotate(360deg) scale(1.5);
-moz-transform: rotate(360deg) scale(1.5);
-o-transform: rotate(360deg) scale(1.5);
-ms-transform: rotate(360deg) scale(1.5);
transform: rotate(360deg) scale(1.5);
cursor: pointer;
-webkit-box-shadow: 0px 3px 5px rgba(0,0,0,0.2);
-moz-box-shadow: 0px 3px 5px rgba(0,0,0,0.2);
box-shadow: 0px 3px 5px rgba(0,0,0,0.2);
}
答案 0 :(得分:0)
这是一个小提琴:http://jsfiddle.net/3hurmyL1/3/
.photobanner {
height: 500px;
width: 3550px;
margin-left: 0;
}
@-webkit-keyframes bannermove {
0% { margin-left: 0; }
100% { margin-left: -2125px; }
}
@keyframes bannermove {
0% { margin-left: 0; }
100% { margin-left: -2125px; }
}
/*keyframe animations*/
.first {
-webkit-animation: bannermove 30s linear infinite;
animation: bannermove 30s linear infinite;
}
希望它有所帮助:)