利用CSS3的 animation 动画特性来完成的,对IE的兼容性不是太好,适用与手机端。
sas *{ margin:0px; padding:0px;} .gs{ position:relative; top:800px; background-color:#099; left:150px; width:80px; } .xz{ animation:roate 2s; animation-fill-mode:forwards; animation-direction:alternate; } @keyframes roate{ from { transform:rotate(0deg); width:100px; height:100px; } to{transform:rotate(360deg); width:200px; height:200px; }} .xs{ width:50px; float: left; height:30px; background-color: #F90; position:fixed; left:700px; top:0px;} 触发动画



