标签:css3 动画 scale 1.1 myfirst 抖动 transform rotate 3deg
<!doctype html> <html charset="utf-8"> <head> <link rel="dns-prefetch" href="http://i.tq121.com.cn"> <meta charset="utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>重点在实现抖动</title> <meta http-equiv="Content-Language" content="zh-cn"> <meta name="keywords" content="关键词,关键词,..." /> <meta name="description" content="关键词,关键词,..." /> <style type="text/css"> /* 实现图片旋转,当鼠标移动上去就停止 */ /* 实现的是过渡 */ img:hover{ width:1000px; /* 开始之前等待两秒,实现过渡 */ transition: width 10s linear 0s; /* Firefox 4 */ -moz-transition:width 10s linear 0s; /* Safari and Chrome */ -webkit-transition:width 10s linear 0s; /* Opera */ -o-transition:width 10s linear 0s; /* 实现角度变化*/ transform: rotate(5deg); -webkit-transform: rotate(5deg); /* Safari 和 Chrome */ -moz-transform: rotate(5deg); } /* 实现抖动 */ @keyframes myfirst { 0% { transform: scale(1); transform: scale(1) } 70%,73%{ transform: scale(0.9) rotate(-3deg); transform: scale(0.9) rotate(-3deg) } 77%,83%,90%,97% { transform: scale(1.1) rotate(3deg); transform: scale(1.1) rotate(3deg) } 80%,87%,93%{ transform: scale(1.1) rotate(-3deg); transform: scale(1.1) rotate(-3deg) } 100% { transform: scale(1) rotate(0); transform: scale(1) rotate(0) } } @-moz-keyframes myfirst /* Firefox */ { 0% { transform: scale(1); transform: scale(1) } 70%,73%{ transform: scale(0.9) rotate(-3deg); transform: scale(0.9) rotate(-3deg) } 77%,83%,90%,97% { transform: scale(1.1) rotate(3deg); transform: scale(1.1) rotate(3deg) } 80%,87%,93%{ transform: scale(1.1) rotate(-3deg); transform: scale(1.1) rotate(-3deg) } 100% { transform: scale(1) rotate(0); transform: scale(1) rotate(0) } } @-webkit-keyframes myfirst /* Safari 和 Chrome */ { 0% { transform: scale(1); transform: scale(1) } 70%,73%{ transform: scale(0.9) rotate(-3deg); transform: scale(0.9) rotate(-3deg) } 77%,83%,90%,97% { transform: scale(1.1) rotate(3deg); transform: scale(1.1) rotate(3deg) } 80%,87%,93%{ transform: scale(1.1) rotate(-3deg); transform: scale(1.1) rotate(-3deg) } 100% { transform: scale(1) rotate(0); transform: scale(1) rotate(0) } } @-o-keyframes myfirst /* Opera */ { 0% { transform: scale(1); transform: scale(1) } 70%,73%{ transform: scale(0.9) rotate(-3deg); transform: scale(0.9) rotate(-3deg) } 77%,83%,90%,97% { transform: scale(1.1) rotate(3deg); transform: scale(1.1) rotate(3deg) } 80%,87%,93%{ transform: scale(1.1) rotate(-3deg); transform: scale(1.1) rotate(-3deg) } 100% { transform: scale(1) rotate(0); transform: scale(1) rotate(0) } } /* 实现捆绑 myfirst*/ img { -webkit-animation: myfirst 3s both infinite; -moz-animation: myfirst 3s both infinite; -ms-animation: myfirst 3s both infinite; animation: myfirst 3s both infinite; } </style> </head> <body> <img width="50" height="300" src="C:\Users\macbook\Desktop\1.jpg"/> </body> </html>View Code
标签:css3,动画,scale,1.1,myfirst,抖动,transform,rotate,3deg 来源: https://www.cnblogs.com/ciscolee/p/12902079.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。