这是一款非常有特点的CSS3按钮,按钮的背景不是北京图片,也不是单纯的颜色,而是一组魔幻般的冒泡背景动画。当我们将鼠标滑过按钮时,按钮的冒泡背景动画就可以展示出来。可以说这款CSS3按钮的设计风格相当有创意,而且令人惊叹的是,这些动画都是用CSS3实现的,并没有使用JavaScript,非常强大。

HTML代码:

XML/HTML Code复制内容到剪贴板
  1. <div id="buttonContainer">
  2. <a href="#" class="button big blue">Big Button</a>
  3. <a href="#" class="button big green">Big Button</a>
  4. <a href="#" class="button big orange">Big Button</a>
  5. <a href="#" class="button big gray">Big Button</a>
  6. <a href="#" class="button blue medium">Medium Button</a>
  7. <a href="#" class="button green medium">Medium Button</a>
  8. <a href="#" class="button orange medium">Medium Button</a>
  9. <a href="#" class="button gray medium">Medium Button</a>
  10. <a href="#" class="button small blue">Small Button</a>
  11. <a href="#" class="button small green">Small Button</a>
  12. <a href="#" class="button small blue rounded">Rounded</a>
  13. <a href="#" class="button small orange">Small Button</a>
  14. <a href="#" class="button small gray">Small Button</a>
  15. <a href="#" class="button small green rounded">Rounded</a>
  16. </div>

css3背景动画

CSS Code复制内容到剪贴板
  1. .button{
  2. font:15px Calibri, Arial, sans-serif;
  3. /* A semi-transparent text shadow */
  4. text-shadow:1px 1px 0 rgba(255,255,255,0.4);
  5. /* Overriding the default underline styling of the links */
  6. text-decoration:none !important;
  7. whitewhite-space:nowrap;
  8. display:inline-block;
  9. vertical-align:baselinebaseline;
  10. position:relative;
  11. cursor:pointer;
  12. padding:10px 20px;
  13. background-repeat:no-repeat;
  14. /* The following two rules are fallbacks, in case
  15. the browser does not support multiple backgrounds. */
  16. background-position:bottombottom left;
  17. background-image:url('button_bg.png');
  18. /* Multiple backgrounds version. The background images
  19. are defined individually in color classes */
  20. background-position:bottombottom left, top rightright, 0 0, 0 0;
  21. background-clip:border-box;
  22. /* Applying a default border raidus of 8px */
  23. -moz-border-radius:8px;
  24. -webkit-border-radius:8px;
  25. border-radius:8px;
  26. /* A 1px highlight inside of the button */
  27. -moz-box-shadow:0 0 1px #fff inset;
  28. -webkit-box-shadow:0 0 1px #fff inset;
  29. box-shadow:0 0 1px #fff inset;
  30. /* Animating the background positions with CSS3 */
  31. /* Currently works only in Safari/Chrome */
  32. -webkit-transition:background-position 1s;
  33. -moz-transition:background-position 1s;
  34. transition:background-position 1s;
  35. }
  36. .button:hover{
  37. /* The first rule is a fallback, in case the browser
  38. does not support multiple backgrounds
  39. */
  40. background-position:top left;
  41. background-position:top left, bottombottom rightright, 0 0, 0 0;
  42. }
  43. .button:active{
  44. /* Moving the button 1px to the bottom when clicked */
  45. bottombottom:-1px;
  46. }
  47. /* The three buttons sizes */
  48. .button.big  { font-size:30px;}
  49. .button.medium { font-size:18px;}
  50. .button.small { font-size:13px;}
  51. /* A more rounded button */
  52. .button.rounded{
  53. -moz-border-radius:4em;
  54. -webkit-border-radius:4em;
  55. border-radius:4em;
  56. }
  57. /* Defining four button colors */
  58. /* BlueButton */
  59. .blue.button{
  60. color:#0f4b6d !important;
  61. border:1px solid #84acc3 !important;
  62. /* A fallback background color */
  63. background-color: #48b5f2;
  64. /* Specifying a version with gradients according to */
  65. background-image: url('button_bg.png'), url('button_bg.png'),
  66. -moz-radial-gradient( center bottombottom, circle,
  67. rgba(89,208,244,1) 0,rgba(89,208,244,0) 100px),
  68. -moz-linear-gradient(#4fbbf7, #3faeeb);
  69. background-image: url('button_bg.png'), url('button_bg.png'),
  70. -webkit-gradient( radial, 50% 100%, 0, 50% 100%, 100,
  71. from(rgba(89,208,244,1)), to(rgba(89,208,244,0))),
  72. -webkit-gradient(linear, 0% 0%, 0% 100%, from(#4fbbf7), to(#3faeeb));
  73. }
  74. .blue.button:hover{
  75. background-color:#63c7fe;
  76. background-image: url('button_bg.png'), url('button_bg.png'),
  77. -moz-radial-gradient( center bottombottom, circle,
  78. rgba(109,217,250,1) 0,rgba(109,217,250,0) 100px),
  79. -moz-linear-gradient(#63c7fe, #58bef7);
  80. background-image: url('button_bg.png'), url('button_bg.png'),
  81. -webkit-gradient( radial, 50% 100%, 0, 50% 100%, 100,
  82. from(rgba(109,217,250,1)), to(rgba(109,217,250,0))),
  83. -webkit-gradient(linear, 0% 0%, 0% 100%, from(#63c7fe), to(#58bef7));
  84. }
  85. /* Green Button */
  86. .green.button{
  87. color:#345903 !important;
  88. border:1px solid #96a37b !important;
  89. background-color: #79be1e;
  90. background-image:url('button_bg.png'), url('button_bg.png'), -moz-radial-gradient(center bottombottom, circle, rgba(162,211,30,1) 0,rgba(162,211,30,0) 100px),-moz-linear-gradient(#82cc27, #74b317);
  91. background-image:url('button_bg.png'), url('button_bg.png'), -webkit-gradient(radial, 50% 100%, 0, 50% 100%, 100, from(rgba(162,211,30,1)), to(rgba(162,211,30,0))),-webkit-gradient(linear, 0% 0%, 0% 100%, from(#82cc27), to(#74b317));
  92. }
  93. .green.button:hover{
  94. background-color:#89d228;
  95. background-image:url('button_bg.png'), url('button_bg.png'), -moz-radial-gradient(center bottombottom, circle, rgba(183,229,45,1) 0,rgba(183,229,45,0) 100px),-moz-linear-gradient(#90de31, #7fc01e);
  96. background-image:url('button_bg.png'), url('button_bg.png'), -webkit-gradient(radial, 50% 100%, 0, 50% 100%, 100, from(rgba(183,229,45,1)), to(rgba(183,229,45,0))),-webkit-gradient(linear, 0% 0%, 0% 100%, from(#90de31), to(#7fc01e));
  97. }
  98. /* Orange Button */
  99. .orange.button{
  100. color:#693e0a !important;
  101. border:1px solid #bea280 !important;
  102. background-color: #e38d27;
  103. background-image:url('button_bg.png'), url('button_bg.png'), -moz-radial-gradient(center bottombottom, circle, rgba(232,189,45,1) 0,rgba(232,189,45,0) 100px),-moz-linear-gradient(#f1982f, #d4821f);
  104. background-image:url('button_bg.png'), url('button_bg.png'), -webkit-gradient(radial, 50% 100%, 0, 50% 100%, 100, from(rgba(232,189,45,1)), to(rgba(232,189,45,0))),-webkit-gradient(linear, 0% 0%, 0% 100%, from(#f1982f), to(#d4821f));
  105. }
  106. .orange.button:hover{
  107. background-color:#ec9732;
  108. background-image:url('button_bg.png'), url('button_bg.png'), -moz-radial-gradient(center bottombottom, circle, rgba(241,192,52,1) 0,rgba(241,192,52,0) 100px),-moz-linear-gradient(#f9a746, #e18f2b);
  109. background-image:url('button_bg.png'), url('button_bg.png'), -webkit-gradient(radial, 50% 100%, 0, 50% 100%, 100, from(rgba(241,192,52,1)), to(rgba(241,192,52,0))),-webkit-gradient(linear, 0% 0%, 0% 100%, from(#f9a746), to(#e18f2b));
  110. }
  111. .gray.button{
  112. color:#525252 !important;
  113. border:1px solid #a5a5a5 !important;
  114. background-color: #a9adb1;
  115. background-image:url('button_bg.png'), url('button_bg.png'), -moz-radial-gradient(center bottombottom, circle, rgba(197,199,202,1) 0,rgba(197,199,202,0) 100px),-moz-linear-gradient(#c5c7ca, #92989c);
  116. background-image:url('button_bg.png'), url('button_bg.png'), -webkit-gradient(radial, 50% 100%, 0, 50% 100%, 100, from(rgba(197,199,202,1)), to(rgba(197,199,202,0))),-webkit-gradient(linear, 0% 0%, 0% 100%, from(#c5c7ca), to(#92989c));
  117. }
  118. .gray.button:hover{
  119. background-color:#b6bbc0;
  120. background-image:url('button_bg.png'), url('button_bg.png'), -moz-radial-gradient(center bottombottom, circle, rgba(202,205,208,1) 0,rgba(202,205,208,0) 100px),-moz-linear-gradient(#d1d3d6, #9fa5a9);
  121. background-image:url('button_bg.png'), url('button_bg.png'), -webkit-gradient(radial, 50% 100%, 0, 50% 100%, 100, from(rgba(202,205,208,1)), to(rgba(202,205,208,0))),-webkit-gradient(linear, 0% 0%, 0% 100%, from(#d1d3d6), to(#9fa5a9));
  122. }

魔幻般冒泡背景的CSS3按钮动画的更多相关文章

  1. 8款超酷而实用的CSS3按钮动画

    1.CSS3分享按钮动画特效 这是一款基于CSS3的社会化分享按钮,按钮非常简单,提供了分享到twitter.facebook.youtube等大型社交网站.每一个分享按钮都有个大社交网站的Logo图 ...

  2. 基础理解2:CSS3按钮动画

    一个Css3按钮效果很好,仔细看了一下发现就是::after,::before然后加上transition,transform等效果实现,主要关注一下几点就能轻松实现: 1.伪类需要position定 ...

  3. 8套迷人精致的CSS3 3D按钮动画

    1.纯CSS3 3D按钮 按钮酷似牛奶般剔透 CSS3按钮一般都可以设计的非常漂亮,利用投影.渐变等CSS3属性特效可以把按钮渲染的十分动感.今天分享的这款CSS3按钮外观非常特别,它看上去酷似晶莹剔 ...

  4. 纯CSS3实现牛奶般剔透的3D按钮特效

    今天我们要来看一款非常特别的纯CSS3 3D按钮,它的外观酷似纯白剔透的牛奶,点击按钮的时候还会出现一种很柔和的弹力效果.按钮按下时,按钮会轻轻的弹动一下,非常逼真.本文我们在观赏演示的同时,也将源代 ...

  5. 5个基于css3超炫的鼠标滑动按钮动画

    今天给大家分享5个基于css3超炫的鼠标滑动按钮动画.这5个按钮鼠标经过的时候有超炫的动画效果.这5个按钮适用浏览器:360.FireFox.Chrome.Safari.Opera.傲游.搜狗.世界之 ...

  6. 6种炫酷的CSS3按钮边框动画特效

    6种炫酷的CSS3按钮边框动画特效Button border animate 用鼠标滑过下面的按钮看看效果! Draw Draw Meet Center Spin Spin Circle Spin T ...

  7. 一款基于css3的动画按钮

    之前为大家分享了 推荐10款纯css3实现的实用按钮.今天给大家带来一款基于css3的动画按钮.实现的效果图如下: 在线预览   源码下载 实现的代码. html代码: <div class=& ...

  8. 20个漂亮 CSS3 按钮效果及优秀的制作教程

    在这篇文章中,我们编译了一组有用的 CSS3 动画按钮教程和引人注目的实验.正如我们都知道的,CSS3在网页设计方面是最重要和最关键的,可以使您的网站对访客更具吸引力和互动性.你可以学习这些教程和试验 ...

  9. css3 animation动画技巧

    一,css3 animation动画前言 随着现在浏览器对css3的兼容性越来越好,使用css3动画来制作动画的例子也越来越广泛,也随着而来带来了许多的问题值得我们能思考.css3动画如何让物体运动更 ...

随机推荐

  1. 用java开发dota英雄最华丽的技能

     爱java 爱dota,突发奇想想用java开发dota操作最华丽的英雄之一的卡尔的技能,因为本人系小白,代码不足的地方还请包涵,有同样爱好的同学欢迎一起研究学习. 先把我的代码呈上 import ...

  2. Javascript高级编程学习笔记(33)—— 客户端检测(2)怪癖检测

    怪癖检测 和能力检测类似,但其目标不同 能力检测的目的是判断浏览器支不支持某种能力 而怪癖检测的目的是判断浏览器是否存在某些缺陷 这种时候需要我们执行一段代码来判断浏览器是否有这样的缺陷 或者说是怪癖 ...

  3. clion打断点不生效

    打开CLion的偏好设置(Preferences),选择Build,Execution,Deployment->Toolchains,将Debugger中的Bundled LLDB修改为Bund ...

  4. Python学习笔记【第十五篇】:Python网络编程三ftp案例练习--断点续传

    开发一个支持多用户在线的FTP程序-------------------主要是学习思路 实现功能点 1:用户登陆验证(用户名.密码) 2:实现多用户登陆 3:实现简单的cmd命令操作 4:文件的上传( ...

  5. springboot打jar包,调用webservice出错

    错误提示 Caused by: java.lang.ClassNotFoundException: com/sun/tools/internal/xjc/api/XJC 在idea中没有问题,但是打成 ...

  6. 深入分析Java I/O的工作机制 (三)网络I/O的工作机制 很详细

    3.网络I/O的工作机制 前言:数据从一台主机(服务端)发送到网络中的另一台主机(客户端)需要经过很多步骤:首先需要有相互沟通的意向.其次要有能够沟通的物理渠道(物理链路):是通过电话,还是直接面对面 ...

  7. extends的使用

    继承extends的使用 继承(extends):           继承让我们可以更好的实现类的扩展.           继承的使用要点:               1.父类也称作超类.基类. ...

  8. Oracle客户端连接数据库配置

    配置文件和路径 配置文件:tnsnames.ora 默认路径:%ORACLE_HOME%\network\admin\tnsnames.ora,%ORACLE_HOME%通常在环境变量中使用. 我的路 ...

  9. Core2.0知识整理

    概述 Commond-Line ASP.NET结构文件 Startup 配置文件 中间件和依赖注入 依赖注入原理 框架自带的依赖注入(IServiceCollection) 依赖注入生命周期 依赖注入 ...

  10. AspNetPager分页控件的使用方法

    1. 首先将AspNetPager.dll复制于应用程序下的bin目录,打开解决方案,引入dll文件 (通过NuGet获取) 2. 在工具栏中添加控件,这样可以支持拖拽使用 3.页面拖入分页控件,设置 ...