实例介绍
【实例截图】

【核心代码】
<!DOCTYPE html>
<html>
<head>
<meta content="测试dome" name="Keywords">
<meta content="测试dome" name="Description">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>按钮</title>
<style>
* {
margin-bottom: 50px !important;
}
</style>
</head>
<body>
<!--*******button******-->
<button class="button-i">button</button>
<style>
.button-i {
background-color: orange;
width: 150px;
height: 40px;
line-height: 40px;
border-radius: 6px 6px;
-webkit-border-radius: 6px 6px;
-moz-border-radius: 6px 6px;
-o-border-radius: 6px 6px;
cursor: pointer;
outline: none;
margin: 0;
border: none;
font-size: 16px;
color: #fff;
}
</style>
<!--*******div******-->
<div class="button-j">div</div>
<style>
.button-j {
background-color: orange;
width: 150px;
height: 40px;
line-height: 40px;
text-align: center;
border-radius: 6px 6px;
-webkit-border-radius: 6px 6px;
-moz-border-radius: 6px 6px;
-o-border-radius: 6px 6px;
cursor: pointer;
outline: none;
margin: 0;
border: none;
font-size: 16px;
color: #fff;
}
</style>
<!--*******button带点击效果******-->
<button class="button-k">button</button>
<style>
.button-k {
display: block;
background-color: rgba(219,87,5,1);
position: relative;
width: 150px;
text-align: center;
outline: none;
cursor: pointer;
margin: 0;
padding: 5px;
border: none;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
-webkit-box-shadow: 0px 4px 0px rgba(219,31,5,1), 0px 4px 6px rgba(0,0,0,.7);
-moz-box-shadow: 0px 4px 0px rgba(219,31,5,1), 0px 4px 6px rgba(0,0,0,.7);
box-shadow: 0px 4px 0px rgba(219,31,5,1), 0px 4px 6px rgba(0,0,0,.7);
-webkit-transition: all .1s ease;
-moz-transition: all .1s ease;
-ms-transition: all .1s ease;
-o-transition: all .1s ease;
transition: all .1s ease;
font-family: 'Yanone Kaffeesatz';
font-weight: 700;
font-size: 16px;
text-decoration: none;
color: rgba(255,255,255,1);
}
.button-k:active {
-webkit-box-shadow: 0px 3px 0px rgba(219,31,5,1), 0px 3px 6px rgba(0,0,0,.9);
-moz-box-shadow: 0px 3px 0px rgba(219,31,5,1), 0px 3px 6px rgba(0,0,0,.9);
box-shadow: 0px 3px 0px rgba(219,31,5,1), 0px 3px 6px rgba(0,0,0,.9);
position: relative;
top: 2px;
}
</style>
<!--*******button点击效果******-->
<button class="button-l">button</button>
<style>
.button-l {
background-color: orange;
width: 150px;
height: 40px;
line-height: 40px;
cursor: pointer;
outline: none;
padding-left: 18px;
background-image: url(images/close.png);
background-repeat: no-repeat;
background-position: 18px center;
border-radius: 6px 6px;
-webkit-border-radius: 6px 6px;
-moz-border-radius: 6px 6px;
-o-border-radius: 6px 6px;
margin: 0;
border: none;
font-size: 16px;
color: #fff;
}
</style>
<div>
<a href="#" class="button-m">Blue</a>
<a href="#" class="button-m bigrounded">Rounded</a>
<a href="#" class="button-m medium">Medium</a>
<a href="#" class="button-m small">Small</a>
<br><br>
<input class="button-m" type="button" value="Input Element">
<button class="button-m">Button Tag</button>
<span class="button-m">Span</span>
<div class="button-m">Div</div>
<p class="button-m">P Tag</p>
<h3 class="button-m">H3</h3>
</div>
<style>
.button-m {
display: inline-block;
zoom: 1;
*display: inline;
vertical-align: baseline;
margin: 0 2px;
outline: none;
cursor: pointer;
text-align: center;
text-decoration: none;
font: 14px/100% Arial, Helvetica, sans-serif;
padding: .5em 2em .55em;
text-shadow: 0 1px 1px rgba(0,0,0,.3);
-webkit-border-radius: .5em;
-moz-border-radius: .5em;
border-radius: .5em;
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);
box-shadow: 0 1px 2px rgba(0,0,0,.2);
color: #d9eef7;
border: solid 1px #0076a3;
background: #0095cd;
background: -webkit-gradient(linear, left top, left bottom, from(#00adee), to(#0078a5));
background: -moz-linear-gradient(top, #00adee, #0078a5);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00adee', endColorstr='#0078a5');
}
.button-m:hover {
background: #007ead;
background: -webkit-gradient(linear, left top, left bottom, from(#0095cc), to(#00678e));
background: -moz-linear-gradient(top, #0095cc, #00678e);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0095cc', endColorstr='#00678e');
}
.button-m:active {
color: #80bed6;
background: -webkit-gradient(linear, left top, left bottom, from(#0078a5), to(#00adee));
background: -moz-linear-gradient(top, #0078a5, #00adee);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0078a5', endColorstr='#00adee');
}
.button-m:hover {
text-decoration: none;
}
.button-m:active {
position: relative;
top: 1px;
}
.bigrounded {
-webkit-border-radius: 2em;
-moz-border-radius: 2em;
border-radius: 2em;
}
.medium {
font-size: 12px;
padding: .4em 1.5em .42em;
}
.small {
font-size: 11px;
padding: .2em 1em .275em;
}
</style>
<!--*******button图片******-->
<input type="image" src="images/button.png" class="button-n" />
<style>
.button-n {
outline: none;
background-size: cover;
}
</style>
</body>
</html>
标签: 按钮
相关软件
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明


网友评论
我要评论