该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);
}
最佳答案
这是一个小提琴作品: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;
}
您不必再添加所有浏览器属性。
在调用关键帧名称时,您添加了引号“”,但您不应:)
希望对您有所帮助:)
关于css - PhotoGallery无法在IE中滚动,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/29592124/