这是一款非常有特点的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. Hadoop Partition函数应用(归档)

    一.实例描述 在这个实例里我们使用简单的数据集,里面包含多条数据,每条数据由姓名.年龄.性别和成绩组成.实例要求是按照如下规则归档用户. 1.找出年龄小于20岁中男生和女生的最大分数 2.找出20岁到 ...

  2. CTF中文件包含的一些技巧

    i春秋作家:lem0n 原文来自:浅谈内存取证 0x00 前言 网络攻击内存化和网络犯罪隐遁化,使部分关键数字证据只存在于物理内存或暂存于页面交换文件中,这使得传统的基于文件系统的计算机取证不能有效应 ...

  3. requests 处理异常错误 requests.exceptions.ConnectionError HTTPSConnectionPool [Errno 10060]

    使用python requests模块调用vmallarg.vmall.com接口API时报如下错误: requests.exceptions.ConnectionError: HTTPSConnec ...

  4. list源码4(参考STL源码--侯捷):transfer、splice、merge、reverse、sort

    list源码1(参考STL源码--侯捷):list节点.迭代器.数据结构 list源码2(参考STL源码--侯捷):constructor.push_back.insert list源码3(参考STL ...

  5. ZOJ Problem Set - 3706

    #include <cstdio> #include <cstdlib> #include <cstring> #include <set> #incl ...

  6. Go内建函数copy

    Go内建函数copy: func copy(dst, src []Type) int 用于将源slice的数据(第二个参数),复制到目标slice(第一个参数). 返回值为拷贝了的数据个数,是len( ...

  7. python捕获Ctrl+C信号

    我们希望当服务器接收到一个 SIGTERM 信号时能够自动关机,或者做一些善后的操作,以下是实现的方法 import signal # 自定义信号处理函数 def my_handler(signum, ...

  8. python使用协程并发

    协程 协程是一种用户态的轻量级线程,又称微线程. 协程拥有自己的寄存器上下文和栈,调度切换时,将寄存器上下文和栈保存到其他地方,在切回来的时候,恢复先前保存的寄存器上下文和栈.因此:协程能保留上一次调 ...

  9. JS判断滚动条到底部,页面是否有滚动条

    要判断页面滚动条是否到底,需要了解三个属性: scrollHeight:获取元素内容高度的度量,包括由于溢出导致的视图中不可见内容,说直白点,算上了滚动条不可见的那部分高度. clientHeight ...

  10. 基于.Net进行前端开发的技术栈发展路线(一)

    前言 今天想讲讲的是我的技术树.我最初是做CS开发的,第一阶段的技术经历是以Powerbuilder来做CS开发,第二阶段开始基于C#做winform开发,眼看前端开发越来越流行,需要更广泛的技术栈势 ...