vue使用css3实现无限旋转动画——面试
<!DOCTYPE html><html><head><title></title><script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js">&
·
<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<style type="text/css">
/*无限旋转动画*/
@keyframes changDeg{
0%{
transform: rotate(0deg);
}
100%{
transform: rotate(360deg);
}
}
#app{
width:500px;
height: 500px;
margin:50px auto;
/*transform: rotate(0deg);*/
background-color:red;
animation:changDeg 2s linear 0.2s infinite;
}
</style>
</head>
<body>
<!-- <div></div> -->
<div id="app"></div>
<script type="text/javascript">
var app = new Vue({
el:'#app'
});
</script>
</body>
</html>
更多推荐
已为社区贡献2条内容
所有评论(0)