html 让按钮立体,纯CSS3打造立体质感按钮

此CSS3按钮包含5个实例DEMO,自适应宽度,立体感强并带有鼠标滑过效果。开发产品、软件必备素材。下载 此效果。

438bfca5b825d6b8ea26c8d53912cda9.png

CSS3按钮HTML代码:

Click me!

Come on, don't be afraid

You can make this as wide as you want ;)

CSS3按钮CSS样式代码:

.a_demo_one {

background-color:#3bb3e0;

padding:10px;

position:relative;

font-family: 'Open Sans', sans-serif;

font-size:12px;

text-decoration:none;

color:#fff;

border: solid 1px #186f8f;

background-image: linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);

background-image: -o-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);

background-image: -moz-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);

background-image: -webkit-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);

background-image: -ms-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);

background-image: -webkit-gradient(

linear,

left bottom,

left top,

color-stop(0, rgb(44,160,202)),

color-stop(1, rgb(62,184,229))

);

-webkit-box-shadow: inset 0px 1px 0px #7fd2f1, 0px 1px 0px #fff;

-moz-box-shadow: inset 0px 1px 0px #7fd2f1, 0px 1px 0px #fff;

box-shadow: inset 0px 1px 0px #7fd2f1, 0px 1px 0px #fff;

-webkit-border-radius: 5px;

-moz-border-radius: 5px;

-o-border-radius: 5px;

border-radius: 5px;

}

.a_demo_one::before {

background-color:#ccd0d5;

content:"";

display:block;

position:absolute;

width:100%;

height:100%;

padding:8px;

left:-8px;

top:-8px;

z-index:-1;

-webkit-border-radius: 5px;

-moz-border-radius: 5px;

-o-border-radius: 5px;

border-radius: 5px;

-webkit-box-shadow: inset 0px 1px 1px #909193, 0px 1px 0px #fff;

-moz-box-shadow: inset 0px 1px 1px #909193, 0px 1px 0px #fff;

-o-box-shadow: inset 0px 1px 1px #909193, 0px 1px 0px #fff;

box-shadow: inset 0px 1px 1px #909193, 0px 1px 0px #fff;

}

.a_demo_one:active {

padding-bottom:9px;

padding-left:10px;

padding-right:10px;

padding-top:11px;

top:1px;

background-image: linear-gradient(bottom, rgb(62,184,229) 0%, rgb(44,160,202) 100%);

background-image: -o-linear-gradient(bottom, rgb(62,184,229) 0%, rgb(44,160,202) 100%);

background-image: -moz-linear-gradient(bottom, rgb(62,184,229) 0%, rgb(44,160,202) 100%);

background-image: -webkit-linear-gradient(bottom, rgb(62,184,229) 0%, rgb(44,160,202) 100%);

background-image: -ms-linear-gradient(bottom, rgb(62,184,229) 0%, rgb(44,160,202) 100%);

background-image: -webkit-gradient(

linear,

left bottom,

left top,

color-stop(0, rgb(62,184,229)),

color-stop(1, rgb(44,160,202))

);

}

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值