您的位置:首页 > 其它

-webkit-animation属性的一个误用

2016-07-04 17:18 197 查看
一直以为–webkit-animation无所不能,结果发现有个属性并不能实现:

display

<html>
<head>
<style>
div {
width:500px;
height:500px;
background-color:black;
-webkit-animation:con 2s linear 0s;
display:block;
}
@-webkit-keyframes con {
0% {
background-color:red;
display:block;
}
99% {
background-color:green;
display:none;
}
100% {
background-color:aliceblue;
display:none;
}
}
/*不能再动画里实现display属性*/
</style>
</head>
<body>
<div></div>
</body>

</html>


页面并不能实现任何效果;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: