这是一款非常有特点的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. Android 基本控件相关知识整理

    Android应用开发的一项重要内容就是界面开发.对于用户来说,不管APP包含的逻辑多么复杂,功能多么强大,如果没有提供友好的图形交互界面,将很难吸引最终用户.作为一个程序员如何才能开发出友好的图形界 ...

  2. 移动端点击事件300ms延迟问题解决方案——fastclick.js

    移动端点击事件300ms延迟的问题由来已久,如下截图 下面截图来自原文:https://www.jianshu.com/p/6e2b68a93c88 网上关于300ms延迟问题的解决方法,大致分为 3 ...

  3. 控制页面打印的2种方法(css3的media媒体查询和window.print())

    在实际开发中,有时可能会有打印的需求.下面我总结了2种打印的方法,希望对各位小伙伴有所帮助. ①:直接用window.print()方法就可以打印整个页面,下面是一个小demo <!DOCTYP ...

  4. 用 VSCode 编写 python

    一.coding 1.选择一个Python解释器 通过命令选项板(⇧⌘P),键入Python:Select Interpreter命令,然后选择一个解释器. 成功后左下角出现: 2.运行代码 二.重构 ...

  5. python 利用matplotlib中imshow()函数绘图

    matplotlib 是python最著名的2D绘图库,它提供了一整套和matlab相似的命令API,十分适合交互式地进行制图.而且也可以方便地将它作为绘图控件,嵌入GUI应用程序中.通过简单的绘图语 ...

  6. 使用eclipse创建maven+动态web的项目

    windows7操作系统 提前安装java jdk1.8版本+apache-maven-3.3.3+wildfly-10.0.0.Final 1.新建maven项目,到other里面找一下 2.使用默 ...

  7. Shell中判断文件,目录是否存在

    一. 具体每个选项对应的判断内容: -e filename 如果 filename存在,则为真 -d filename 如果 filename为目录,则为真 -f filename 如果 filena ...

  8. threadid=1: thread exiting with uncaught exception (group=0x40fca9a8)的问题

    今天在项目开发中碰到了这样一个问题: 项目在Nexus5[Android 6.0]上面运行正常,在华为荣耀6[Android 4.4.2]上面运行到指定activity崩溃(不是应用启动崩溃):然后后 ...

  9. [工具向]__申请,下载,使用百度地图api

    前言 api即应用程序接口,在我们的日常开发中,我们不仅可以在开源代码仓库(,github,码云)中获得很大的帮助,在日常开发中占重要地位的另一个东西就是api,我们可以使用众多的第三方编写的优秀的a ...

  10. CentOS7.0小随笔——指令基本操作(Part.A)

    与其说是CentOS7.0的小随笔,说老实话,基本指令在每个发行版本的Linux中都基本上是一致的. Part.A部分我们讲述以下四个方面:命令行界面与图形界面.Linux系统的关闭与重启.命令行帮助 ...