我的代码在这里不起作用......关于将什么作为 if 语句的条件放入的任何其他想法?非常感谢任何帮助。谢谢!
HTML:
<img class="image image1" src="images/spongebob1.jpg" />
CSS:
.image {
height: 94%;
margin: 0 auto;
position: absolute;
animation: moveSlider 5s 1;
-webkit-animation: moveSlider 5s 1;
}
@keyframes moveSlider {
from {left:0px;}
to {left:200px;}
}
@-webkit-keyframes moveSlider {
from {opacity:0;}
to {opacity:1;}
}
JS:
$(document).ready(function() {
$(".image2, .image3, .image4, .image5").hide();
if ($(".image1").css('opacity') === '1') {
$(".image1").hide();
}
});