之前已经为大家介绍了好几款css3按钮,今天要为大家介绍的是一款纯css3实现的圆形旋转分享按钮。旋转的角度可以自己调整。在demo中演示了三个角度旋转。360度,60度,-360度。如图:

在线预览   源码下载

看下实现代码:

html代码:

 <b>360 degree spin onMouseover and onMouseout</b></p>
<p id="socialicons">
<a href="http://www.w2bc.com/">
<img border="0" src="rss.png" /></a> <a href="http://www.w2bc.com/">
<img border="0" src="delicious.png" /></a> <a href="http://www.w2bc.com/">
<img border="0" src="facebook.png" /></a> <a href="http://www.w2bc.com/">
<img border="0" src="twitter.png" /></a> <a href="http://www.w2bc.com/">
<img border="0" src="yahoo.png" /></a>
</p>
<p>
<b>60 degree spin onMouseover and onMouseout</b></p>
<p id="socialicons2">
<a href="http://www.w2bc.com/">
<img border="0" src="rss.png" /></a> <a href="http://www.w2bc.com/">
<img border="0" src="delicious.png" /></a> <a href="http://www.w2bc.com/">
<img border="0" src="facebook.png" /></a> <a href="http://www.w2bc.com/">
<img border="0" src="twitter.png" /></a> <a href="http://www.w2bc.com/">
<img border="0" src="yahoo.png" /></a>
</p>
<p>
<b>-360 degree spin onMouseover ONLY</b></p>
<p id="socialicons3">
<a href="http://www.w2bc.com/">
<img border="0" src="rss.png" /></a> <a href="http://www.w2bc.com/">
<img border="0" src="delicious.png" /></a> <a href="http://www.w2bc.com/">
<img border="0" src="facebook.png" /></a> <a href="http://www.w2bc.com/">
<img border="0" src="twitter.png" /></a> <a href="http://www.w2bc.com/">
<img border="0" src="yahoo.png" /></a>
</p>

css代码:

 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);
}

注:本文爱编程原创文章,转载请注明原文地址:http://www.w2bc.com/Article/4762

最新文章

  1. python中使用heapq查看最大与最小的N个元素列表
  2. nginx参数说明
  3. 使用PreApplicationStartMethodAttribute
  4. ios 转发一篇对于6 plus的分辨率模式的说明
  5. Objective-C运行时编程 - 方法混写 Method Swizzling
  6. javascript Deferred和递归次数限制
  7. Hive sql 语法解读
  8. error: WatchKit App doesn&#39;t contain any WatchKit Extensions whose WKAppBundleIdentifier matches
  9. Selenium 上传文件失败,解决办法一
  10. iOS性能优化技术
  11. Django restful-framework初步学习
  12. RK3288 uboot启动流程
  13. 史上最全Java面试题整理(附参考答案)
  14. Iris Classification on PyTorch
  15. mac系统下安装Composer和laravel
  16. tomcat源码 Container
  17. RxJava+Retrofit+OkHttp,一步一步封装网络框架;
  18. 详解PHP的执行原理和流程
  19. 加速安装 Sharepoint 2013 SP1
  20. gradle 刷新缓存

热门文章

  1. 前端工程精粹(一):静态资源版本更新与缓存(附精简js的工具)
  2. 【环境配置】配置ndk
  3. C-C和指针作业题(第一章)
  4. Hibernate学习备忘
  5. Python 绘图库的使用:matplotlib
  6. 设置当前Activity的屏幕亮度
  7. LINUX创建本地yum源
  8. OAF_OAF组件系列1 - Item Style汇总(概念)
  9. select函数的并发限制和 poll 函数应用举例
  10. I/O复用 - 各种不同的IO模型