css3实现的4种动画特效按钮
今天要给大家介绍的是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 />
<br />
<div class="bouton_2">
<a href="#123">
<img src="caddie.png" />
<span class="texteduboutton_2">Ajouter au panier</span></a>
</div>
<br />
<br />
<div class="bouton_3">
<a href="#123">
<img src="caddie.png" />
<span class="texteduboutton_3">Ajouter au panier</span></a>
</div>
<br />
<br />
<div class="bouton_4">
<a href="#123">
<img src="caddie.png" />
<span class="texteduboutton_4">Add to cart</span></a>
</div>
<br />
<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种动画特效按钮的更多相关文章
- CSS3鼠标悬停8种动画特效
在线演示 本地下载
- 基于jQ+CSS3页面滚动内容元素动画特效
今天给大家分享一款基于jQ+CSS3页面滚动内容元素动画特效.这是一款基于jQuery+CSS3实现的页面滚动代码.该实例适用于适用浏览器:360.FireFox.Chrome.Safari.Oper ...
- 一款jquery和css3实现的卡通人物动画特效
之前为大家分享了很多jquery和css3的动画实例.今天给大家带来一款非常炫的jquery和css3实现的卡通人物动画特效.效果图如下: 在线预览 源码下载 实现的代码. html代码: < ...
- 分享十个CSS3鼠标滑过文字动画特效
介绍10组基于CSS3的鼠标滑过文字动画特效,有上凸.下凹等文字动画.这些炫酷的CSS3文字效果可以让网页变得更加绚丽.效果图如下: 在线预览 源码下载 实现的代码. html代码: <h2 ...
- iOS-各种动画特效
概述 广播跑马灯/弹幕/直播点赞/烟花/雪花等动画特效, 后续增加~ 详细 代码下载:http://www.demodashi.com/demo/10674.html 一.实现功能 1. 广播跑马灯 ...
- 利用CSS3实现div页面淡入动画特效
利用CSS3实现页面淡入动画特效 摘要 利用CSS3动画属性"@keyframes "可实现一些动态特效,具体语法和参数可以网上自行学习.这篇文章主要是实践应用一下这个动画属性 ...
- 纯css3 3D图片立方体旋转动画特效
纯css3 3D立方体模块,鼠标触碰,模块炸开,大立方体中套小立方体 效果展示 手机扫描二维码体验效果: 效果图如下: 源码下载:http://hovertree.com/h/bjaf/0qmul8g ...
- css3动画特效:纯css3制作win8加载动画特效
Windows 8 完整效果如上图:这个里面可能是css冲突,喜欢的可以自己去体征一下: css特效代码: <style type="text/css"> ...
- 10大炫酷的HTML5文字动画特效欣赏
文字是网页中最基本的元素,在CSS2.0时代,我们只能在网页上展示静态的文字,只能改变他的大小和颜色,显得枯燥无味.随着HTML5的发展,现在网页中的文字样式变得越来越丰富了,甚至出现了文字动画,HT ...
随机推荐
- 【java】break outer,continue outer的使用
break默认是结束当前循环,有时我们在使用循环时,想通过内层循环里的语句直接跳出外层循环,java提供了使用break直接跳出外层循环,此时需要在break后通过标签指定外层循环.java中的标签是 ...
- JavaScript三种方式改变标签css
原文地址:https://www.cnblogs.com/xiangru0921/p/6514225.html <body> <div id="div">这 ...
- Mac 常用软件推荐
1.常用软件推荐 这里推荐的 apps 在开发者圈子内普遍评价不错,能便利的处理日常的开发和使用的任务.以下推荐分为四类: 开发者工具 生产力工具 办公工具 其他 2.Developer Tools ...
- Oracle 12C -- Plug in a Non-CDB as a PDB
1.备份non-CDB数据库2.关闭non-CDB数据库 SQL> shutdown immediate; 3.将non-CDB至于只读状态 SQL> startup open read ...
- Android登录client,验证码的获取,网页数据抓取与解析,HttpWatch基本使用
大家好,我是M1ko.在互联网时代的今天,假设一个App不接入互联网.那么这个App一定不会有长时间的生命周期,因此Android网络编程是每个Android开发人员必备的技能.博主是在校大学生,自学 ...
- webservice复杂类型实例
1.准备工作: 概念:SOAP(简单对象访问协议).WSDL(web服务描述语言).XML(可扩展标记语言).axis(阿帕奇可扩展交互系统) (1) 下载axis1.4,将axis1.4中的 ...
- Feign请求中报错:Request header is too large 的解决方案。
现在我们项目中都已迁入spring boot和spring cloud. 服务间调用现在都改成feign的调用方式,但是上次在实际使用过程中出现过:Request header is too larg ...
- PHP读取超大日志文件
打开一个17G的日志文件,都不吃力,除了占cpu之外,内存占用不多,如果直接fopen根本打不开 注:它是逐行读取的 foreach( glob( ngx_log. "/*.log" ...
- Android:percent 布局
Android 新引入的布局,百分比布局,Percent 布局 主要分为两种:PercentFrameLayout he PercentRelativeLayout 布局 通过 support 库引入 ...
- Python 的并发编程
这篇文章将讲解 Python 并发编程的基本操作.并发和并行是对孪生兄弟,概念经常混淆.并发是指能够多任务处理,并行则是是能够同时多任务处理.Erlang 之父 Joe Armstrong 有一张非常 ...