这是一款非常有特点的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. {黑掉这个盒子} \\ FluxCapacitor Write-Up

    源标题:{Hack the Box} \ FluxCapacitor Write-Up 标签(空格分隔): CTF   好孩子们.今天我们将学习耐心和情绪管理的优点.并且也许有一些关于绕过WEB应用防 ...

  2. Java核心技术卷一基础知识-第5章-继承-读书笔记

    第5章 继承 本章内容: * 类.超类和子类 * Object:所有类的超类 * 泛型数组列表 * 对象包装器和自动装箱 * 参数数量可变的方法 * 枚举类 * 反射 * 继承设计的技巧 利用继承,人 ...

  3. SpringAop实操之记录关键业务请求数据

    AOP,中文名称,切面.在不影响业务代码情况下,实现想要的功能,是个真炫酷的事. aop是个好东西,记录日志是必须的. 记录数据也一样的,那么也是可以用aop来实现的,这里借助注解一起解决问题吧. 因 ...

  4. Linux主机操作系统加固规范

      对于企业来说,安全加固是一门必做的安全措施.主要分为:账号安全.认证授权.协议安全.审计安全.总的来说,就是4A(统一安全管理平台解决方案),账号管理.认证管理.授权管理.审计管理.用漏洞扫描工具 ...

  5. 机器学习入门02 - 深入了解 (Descending into ML)

    原文链接:https://developers.google.com/machine-learning/crash-course/descending-into-ml/ 线性回归是一种找到最适合一组点 ...

  6. Linux系统 - 源码编译安装Nginx

    什么是Nginx? Nginx ("engine x") 是一个高性能的 HTTP 和 反向代理 服务器,也是一个 IMAP/POP3/SMTP 代理服务器,在高连接并发的情况下N ...

  7. springBoot(1)---springboot初步理解

    springboot初步理解 在没有用SpringBoot之前,我们用spring和springMVC框架,但是你要做很多比如: (1)配置web.xml,加载spring和spring mvc 2) ...

  8. redis 系列4 数据结构之链表

    一. 概述 链表提供了高效的节点重排能力,以及顺序性的节点访问方式,并且可能通过增删节点来灵活地调整链表的长度.作为一种数据结构,在C语言中并没有内置的这种数据结构.所以Redis构建了自己的链表实现 ...

  9. Java单元测试(Junit+Mock+代码覆盖率)

    微信公众号[程序员江湖] 作者黄小斜,斜杠青年,某985硕士,阿里 Java 研发工程师,于 2018 年秋招拿到 BAT 头条.网易.滴滴等 8 个大厂 offer,目前致力于分享这几年的学习经验. ...

  10. html2canvas关于图片不能正常截取

    问题 首先说说遇到了什么问题.首先有这么一个需求.需要前端根据后端传过来数据,动态的生成图片.图片中的文案.背景图片.用户头像全部都是通过后端的接口获取.但是使用 html2canvas 生成的can ...