@Keyframes 插入圖片, 謝謝
用keyframes做一個圖片切換的功能, 為什么不顯示 謝謝?
<!DOCTYPE html>
<html>
<head>
?? ?<meta charset="UTF-8">
?? ?<title></title>
?? ?<style type="text/css">
?? ??? ?@keyframes changecolor{
?? ??? ??? ?0%{
?? ??? ??? ??? ?background-image: url(http://www.w3cplus.com/demo/css3/CSS3Fullbackground/sbg1.jpg);
?? ??? ??? ?}
?? ??? ??? ?20%{
?? ??? ??? ??? ?background-image: url(http://www.w3cplus.com/demo/css3/CSS3Fullbackground/sbg2.jpg);
?? ??? ??? ?}
?? ??? ??? ?50%{
?? ??? ??? ??? ?background-image: url(http://www.w3cplus.com/demo/css3/CSS3Fullbackground/sbg3.jpg);
?? ??? ??? ?}
?? ??? ??? ?80%{
?? ??? ??? ??? ?background-image: url(http://www.w3cplus.com/demo/css3/CSS3Fullbackground/sbg4.jpg);
?? ??? ??? ?}
?? ??? ??? ?100%{
?? ??? ??? ??? ?background-image: url(http://www.w3cplus.com/demo/css3/CSS3Fullbackground/sbg5.jpg);
?? ??? ??? ?}
?? ??? ?}
?? ??? ?.TestKey{
?? ??? ??? ?width: 220px;
?? ??? ??? ?height: 165px;
?? ??? ??? ?margin:20px auto;
?? ??? ?}
?? ??? ?.TestKey:hover{
?? ??? ??? ?animation: changecolor 5s ease-out .2s;
?? ??? ?}
?? ?</style>
</head>
<body>
?? ?<div>TestKeyframes</div>
</body>
</html>
2016-05-04
function demo(){
}
2016-05-02
class="TestKey"忘了寫,還有瀏覽器兼容前綴沒寫
2016-01-27
你的div少了類名啊。