网页制作 
首页 > 网页制作 > 浏览文章

CSS3图片旋转特效(360/60/-360度)

(编辑:jimmy 日期: 2024/11/26 浏览:3 次 )
由于没法展示效果只是截了个图
CSS3图片旋转特效(360/60/-360度) 
下面是实现代码:

复制代码代码如下:
<style>
p#socialicons img{ /* 1st set of icons. Rotate them 360deg onmouseover and out */
-moz-transition: all 0.8s ease-in-out;
-webkit-transition: all 0.8s ease-in-out;
-o-transition: all 0.8s ease-in-out;
-ms-transition: all 0.8s ease-in-out;
transition: all 0.8s ease-in-out;
}
p#socialicons img:hover{
-moz-transform: rotate(360deg);
-webkit-transform: rotate(360deg);
-o-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
p#socialicons2 img{ /* 2nd set of icons. Rotate them 60deg onmouseover and out */
-moz-transition: all 0.2s ease-in-out;
-webkit-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
-ms-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
p#socialicons2 img:hover{
-moz-transform: rotate(70deg);
-webkit-transform: rotate(70deg);
-o-transform: rotate(70deg);
-ms-transform: rotate(70deg);
transform: rotate(70deg);
}
p#socialicons3 img{ /* 3rd set of icons. Rotate them -360deg onmouseover ONLY. Note where the "transition prop is added */
}
p#socialicons3 img:hover{
-moz-transition: all 0.5s ease-in-out;
-webkit-transition: all 0.5s ease-in-out;
-o-transition: all 0.5s ease-in-out;
-ms-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;
-moz-transform: rotate(-360deg);
-webkit-transform: rotate(-360deg);
-o-transform: rotate(-360deg);
-ms-transform: rotate(-360deg);
transform: rotate(-360deg);
}
</style>
<b>360度旋转 onmouseover和onmouseout</b></p>
<p id="socialicons">
<a href="#">
<img border="0" src="/UploadFiles/2021-03-30/rss.png"><a href="#">
<img border="0" src="http://www.zzsck.org/wp-content/uploads/2013/10/delicious.png"><a href="#">
<img border="0" src="/UploadFiles/2021-03-30/facebook.png"><a href="#">
<img border="0" src="http://www.zzsck.org/wp-content/uploads/2013/10/twitter.png"><a href="#">
<img border="0" src="/UploadFiles/2021-03-30/yahoo.png"></p>
<p><b>60度旋转 onMouseover and onMouseout</b></p>
<p id="socialicons2">
<a href="#">
<img border="0" src="/UploadFiles/2021-03-30/rss.png"><a href="#">
<img border="0" src="http://www.zzsck.org/wp-content/uploads/2013/10/delicious.png"><a href="#">
<img border="0" src="/UploadFiles/2021-03-30/facebook.png"><a href="#">
<img border="0" src="http://www.zzsck.org/wp-content/uploads/2013/10/twitter.png"><a href="#">
<img border="0" src="/UploadFiles/2021-03-30/yahoo.png"></p>
<p><b>-360度旋转 onMouseover</b></p>
<p id="socialicons3">
<a href="#">
<img border="0" src="/UploadFiles/2021-03-30/rss.png"><a href="#">
<img border="0" src="http://www.zzsck.org/wp-content/uploads/2013/10/delicious.png"><a href="#">
<img border="0" src="/UploadFiles/2021-03-30/facebook.png"><a href="#">
<img border="0" src="http://www.zzsck.org/wp-content/uploads/2013/10/twitter.png"><a href="#">
<img border="0" src="/UploadFiles/2021-03-30/yahoo.png"></p>

上一篇:CSS3文本换行word-wrap解决英文文本超过固定宽度不换行
下一篇:css中默认中文字体font-family列表
一句话新闻
一文看懂荣耀MagicBook Pro 16
荣耀猎人回归!七大亮点看懂不只是轻薄本,更是游戏本的MagicBook Pro 16.
人们对于笔记本电脑有一个固有印象:要么轻薄但性能一般,要么性能强劲但笨重臃肿。然而,今年荣耀新推出的MagicBook Pro 16刷新了人们的认知——发布会上,荣耀宣布猎人游戏本正式回归,称其继承了荣耀 HUNTER 基因,并自信地为其打出“轻薄本,更是游戏本”的口号。
众所周知,寻求轻薄本的用户普遍更看重便携性、外观造型、静谧性和打字办公等用机体验,而寻求游戏本的用户则普遍更看重硬件配置、性能释放等硬核指标。把两个看似难以相干的产品融合到一起,我们不禁对它产生了强烈的好奇:作为代表荣耀猎人游戏本的跨界新物种,它究竟做了哪些平衡以兼顾不同人群的各类需求呢?
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网 网站地图 SiteMap