今天要给大家介绍的是css3按钮,里面包含四种特效的动画,如下图:

在线预览   
下载源码

实现html代码:

  <div align="center" class="fond">
<br />
<div class="bouton_1">
<a href="#123">
<img src="caddie.png" />
<span class="texteduboutton_1">Ajouter au panier</span></a>
</div>
<br />
&nbsp;<br />
<div class="bouton_2">
<a href="#123">
<img src="caddie.png" />
<span class="texteduboutton_2">Ajouter au panier</span></a>
</div>
<br />
&nbsp;<br />
<div class="bouton_3">
<a href="#123">
<img src="caddie.png" />
<span class="texteduboutton_3">Ajouter au panier</span></a>
</div>
<br />
&nbsp;<br />
<div class="bouton_4">
<a href="#123">
<img src="caddie.png" />
<span class="texteduboutton_4">Add to cart</span></a>
</div>
<br />
&nbsp;<br />
</div>

实现的css代码:

.fond{position:fixed;padding-top:px;top:;left:; right:;bottom:;
background-image:url(fond_4.jpg);background-size:cover;overflow-y:auto;} /*///////////////////////////////BOUTON _ 1///////////////////////////////////////*/
.bouton_1{
width:200px;
height:40px;
padding:10px;
border-radius:40px;
background-color:#CB2025;
overflow:hidden;
-webkit-transition:all 0.2s ease-in;
-moz-transition:all 0.2s ease-in;
-ms-transition:all 0.2s ease-in;
-o-transition:all 0.2s ease-in;
transition:all 0.2s ease-in;
}
.bouton_1:hover{
width:40px;
height:40px;
border-radius:40px;
background-color:#60121C;
}
.texteduboutton_1
{
width:70%;
padding-right: 10px;
float:right;
line-height:40px;
color:#ffffff;
font-family:'Roboto';
font-weight:;
font-size:18px;
} /*///////////////////////////////BOUTON _ 2///////////////////////////////////////*/
.bouton_2{
width:200px;
height:40px;
padding:10px;
background-color:#CB2025;
overflow:hidden;
-webkit-transition: all 0.5s ease-out;
-moz-transition: all 0.5s ease-out;
-ms-transition: all 0.5s ease-out;
-o-transition: all 0.5s ease-out;
transition: all 0.5s ease-out;
}
.bouton_2:hover{
width:40px;
height:40px;
background-color:#60121C;
-webkit-transform:rotateZ(360deg);
-moz-transform:rotateZ(360deg);
-ms-transform:rotateZ(360deg);
-o-transform:rotateZ(360deg);
transform:rotateZ(360deg);
}
.texteduboutton_2
{
width:70%;
padding-right: 10px;
float:right;
line-height:40px;
color:#ffffff;
font-family:'Roboto';
font-weight:;
font-size:18px;
}
/*///////////////////////////////BOUTON _ 3///////////////////////////////////////*/ .bouton_3{
overflow:hidden;
width:200px;
height:40px;
padding:10px;
background-color:#CB2025;
}
.bouton_3:hover{
width:40px;
height:40px;
background-color:#60121C;
-webkit-animation: anim_trois 1.2s;
-moz-animation: anim_trois 1.2s;
-ms-animation: anim_trois 1.2s;
-o-animation: anim_trois 1.2s;
animation: anim_trois 1.2s;
}
.texteduboutton_3
{
width:70%;
padding-right: 10px;
float:right;
line-height:40px;
color:#ffffff;
font-family:'Roboto';
font-weight:;
font-size:18px;
}
@-webkit-keyframes anim_trois {
0% {
width:200px;
-webkit-transform: perspective( 600px ) rotateY( 0deg );
}
50% {
width:40px;
height:40px;
-webkit-transform: perspective( 600px ) rotateY( 0deg );
}
100% {
width:40px;
height:40px;
background-color:#60121C;
-webkit-transform: perspective( 600px ) rotateY( 180deg );
}
}
@-moz-keyframes anim_trois {
0% {
width:200px;
-moz-transform: perspective( 600px ) rotateY( 0deg );
}
50% {
width:40px;
height:40px;
-moz-transform: perspective( 600px ) rotateY( 0deg );
}
100% {
width:40px;
height:40px;
background-color:#60121C;
-moz-transform: perspective( 600px ) rotateY( 180deg );
}
}
@-ms-keyframes anim_trois {
0% {
width:200px;
-ms-transform: perspective( 600px ) rotateY( 0deg );
}
50% {
width:40px;
height:40px;
-ms-transform: perspective( 600px ) rotateY( 0deg );
}
100% {
width:40px;
height:40px;
background-color:#60121C;
-ms-transform: perspective( 600px ) rotateY( 180deg );
}
}
@-o-keyframes anim_trois {
0% {
width:200px;
-o-transform: perspective( 600px ) rotateY( 0deg );
}
50% {
width:40px;
height:40px;
-o-transform: perspective( 600px ) rotateY( 0deg );
}
100% {
width:40px;
height:40px;
background-color:#60121C;
-o-transform: perspective( 600px ) rotateY( 180deg );
}
}
@keyframes anim_trois {
0% {
width:200px;
transform: perspective( 600px ) rotateY( 0deg );
}
50% {
width:40px;
height:40px;
transform: perspective( 600px ) rotateY( 0deg );
}
100% {
width:40px;
height:40px;
background-color:#60121C;
transform: perspective( 600px ) rotateY( 180deg );
}
} /*///////////////////////////////BOUTON _ 4///////////////////////////////////////*/
.bouton_4{
width:40px;
height:40px;
padding:10px;
border-radius:40px;
background-color:#CB2025;
overflow:hidden;
-webkit-transition:all 0.2s ease-in;
-moz-transition:all 0.2s ease-in;
-ms-transition:all 0.2s ease-in;
-o-transition:all 0.2s ease-in;
transition:all 0.2s ease-in;
}
.bouton_4:hover{
width:200px;
height:40px;
border-radius:40px;
background-color:#97bf0d;
}
.texteduboutton_4
{
width:70%;
padding-right: 10px;
float:right;
line-height:40px;
color:#ffffff;
font-family:'Roboto';
font-weight:;
font-size:18px;
}

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

css3实现的4种动画特效按钮的更多相关文章

  1. CSS3鼠标悬停8种动画特效

    在线演示 本地下载

  2. 基于jQ+CSS3页面滚动内容元素动画特效

    今天给大家分享一款基于jQ+CSS3页面滚动内容元素动画特效.这是一款基于jQuery+CSS3实现的页面滚动代码.该实例适用于适用浏览器:360.FireFox.Chrome.Safari.Oper ...

  3. 一款jquery和css3实现的卡通人物动画特效

    之前为大家分享了很多jquery和css3的动画实例.今天给大家带来一款非常炫的jquery和css3实现的卡通人物动画特效.效果图如下: 在线预览   源码下载 实现的代码. html代码: < ...

  4. 分享十个CSS3鼠标滑过文字动画特效

    介绍10组基于CSS3的鼠标滑过文字动画特效,有上凸.下凹等文字动画.这些炫酷的CSS3文字效果可以让网页变得更加绚丽.效果图如下: 在线预览   源码下载 实现的代码. html代码: <h2 ...

  5. iOS-各种动画特效

    概述 广播跑马灯/弹幕/直播点赞/烟花/雪花等动画特效, 后续增加~ 详细 代码下载:http://www.demodashi.com/demo/10674.html 一.实现功能 1. 广播跑马灯 ...

  6. 利用CSS3实现div页面淡入动画特效

    利用CSS3实现页面淡入动画特效   摘要 利用CSS3动画属性"@keyframes "可实现一些动态特效,具体语法和参数可以网上自行学习.这篇文章主要是实践应用一下这个动画属性 ...

  7. 纯css3 3D图片立方体旋转动画特效

    纯css3 3D立方体模块,鼠标触碰,模块炸开,大立方体中套小立方体 效果展示 手机扫描二维码体验效果: 效果图如下: 源码下载:http://hovertree.com/h/bjaf/0qmul8g ...

  8. css3动画特效:纯css3制作win8加载动画特效

    Windows 8     完整效果如上图:这个里面可能是css冲突,喜欢的可以自己去体征一下:   css特效代码: <style type="text/css"> ...

  9. 10大炫酷的HTML5文字动画特效欣赏

    文字是网页中最基本的元素,在CSS2.0时代,我们只能在网页上展示静态的文字,只能改变他的大小和颜色,显得枯燥无味.随着HTML5的发展,现在网页中的文字样式变得越来越丰富了,甚至出现了文字动画,HT ...

随机推荐

  1. ceph-RGW Jewel版新概念

    一.概述 zone: 包含多个RGW实例的一个逻辑概念.zone不能跨集群,同一个zone的数据保存在同一组pool中: zonegroup:一个zonegroup如果包含一个或多个zone,如果包含 ...

  2. jQuery插件EasyDrag轻松实现JS拖动的效果

    jquery.easydrag下载地址:http://ishare.iask.sina.com.cn/f/34289681.html 实现效果图:分布实现一.页面Html标签元素定义 <!doc ...

  3. mysql快速移植表数据

    使用select into outfile xxx ,  load data infile xxx 例如 : SELECT * into outfile '/tmp/out.txt' FROM `db ...

  4. linux大文件传输

    Mysql复制,初始化服务器,备份/还原等大文件复制是很常见的任务,他们完成的实际任务可以概括为: 1,(可选)压缩文件 2,发送文件 3,解压文件 4,验证文件一致性 下面介绍几种方法: 1,最简单 ...

  5. easyui datagrid加载数据的三种方式

    1.加载本地数据 var obj = {"total":2,"rows":[{id:"1",name:"一"},{id: ...

  6. C++的std::string的“读时也拷贝”技术!

    C++的std::string的读时也拷贝技术! 嘿嘿,你没有看错,我也没有写错,是读时也拷贝技术.什么?我的错,你之前听说写过时才拷贝,嗯,不错的确有这门技术,英文是Copy On Write,简写 ...

  7. php中array_merge合并数组详解

    如果键名有重复,该键的键值为最后一个键名对应的值(后面的覆盖前面的).如果数组是数字索引的,则键名会以连续方式重新索引. 注释:如果仅仅向 array_merge() 函数输入了一个数组,且键名是整数 ...

  8. Ubuntu局域网下利用client联网

    Ubuntu是一个非常好的Linux操作系统,可是对于刚刚安装使用它的新手来说如何用Ubuntu连入网络却是一大难关.如今就记录一下自己在Ubuntu下上网的过程. ★client 将client解压 ...

  9. SQLServer2012 (非)聚集索引存储探究

    SQLServer2012 (非)聚集索引存储探究 Author:zfive5(zidong) Email:zfive5@163.com 引子 因为写了前一篇文字<SQLServer2012 表 ...

  10. MySQL Metadata Lock详解

    Metadata Lock 的作用: 要直接说出Metadata Lock 的作用.以我目前的文字功底是不行的.好在我可以通过一个例子来说明. 假设session 1 在正在执行如下的SQL语句 se ...