利用css3制作3D样式按钮实现代码
网站建设 2023-01-28 20:49www.1681989.com免费网站
效果图如下
源码如下
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
body {
font-family: Arial, sans-serif;
}
#contaer {
marg: 120px auto;
text-align: center;
}
.button {
-webkit-transform: rotateX( 35deg );
position: relative;
display: le-block;
width: 100px;
paddg: 42px 15px;
marg: 0px 10px;
background-color: #C91826;
color: #fff;
font-weight: bold;
font-size: 40px;
text-decoration: none;
text-align: center;
text-shadow: 0px -1px 0px rgba(0,0,0,0.5);
border: 1px solid;
border-color: #B21522;
border-radius: 78px;
-moz-border-radius: 78px;
-webkit-border-radius: 78px;
box-shadow: set 0px -4px 5px rgba(255,255,255,0.2),
set 0px 1px 5px rgba(255,255,255,0.2),
//
0px 12px 0px #231F20,
0px 14px 0px #231F20,
0px 16px 0px #231F20,
//
0px 8px 5px rgba(0,0,0,0.5);
-moz-box-shadow: set 0px -4px 5px rgba(255,255,255,0.2),
set 0px 1px 5px rgba(255,255,255,0.2),
//
0px 12px 0px #231F20,
0px 14px 0px #231F20,
0px 16px 0px #231F20,
//
0px 8px 5px rgba(0,0,0,0.5);
-webkit-box-shadow: set 5px -4px 5px rgba(255,255,255,0.2),
set 5px 1px 5px rgba(255,255,255,0.2),
//
0px 12px 0px #231F20,
0px 14px 0px #231F20,
0px 16px 0px #231F20;
}
.button:hover {
background-color: #B21522;
color: #e3e3e3;
}
.button:active {
: 8px;
box-shadow: set 0px 4px 5px rgba(255,255,255,0.4),
set 0px -1px 5px rgba(255,255,255,0.2),
//
0px 8px 0px #231F20,
//
0px 9px 5px rgba(0,0,0,0.5);
-moz-box-shadow: set 0px 4px 5px rgba(255,255,255,0.4),
set 0px -1px 5px rgba(255,255,255,0.2),
//
0px 8px 0px #231F20,
//
0px 9px 5px rgba(0,0,0,0.5);
-webkit-box-shadow: set 0px 4px 5px rgba(255,255,255,0.4),
set 0px -1px 5px rgba(255,255,255,0.2),
//
0px 8px 0px #231F20,
//
0px 9px 5px rgba(0,0,0,0.5);
}
</style>
</head>
<body>
<div id="contaer">
<a href="#" class="button">开始</a>
<a href="#" class="button">结束</a>
</div>
</body>
</html>
源码如下
复制代码
代码如下:<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
body {
font-family: Arial, sans-serif;
}
#contaer {
marg: 120px auto;
text-align: center;
}
.button {
-webkit-transform: rotateX( 35deg );
position: relative;
display: le-block;
width: 100px;
paddg: 42px 15px;
marg: 0px 10px;
background-color: #C91826;
color: #fff;
font-weight: bold;
font-size: 40px;
text-decoration: none;
text-align: center;
text-shadow: 0px -1px 0px rgba(0,0,0,0.5);
border: 1px solid;
border-color: #B21522;
border-radius: 78px;
-moz-border-radius: 78px;
-webkit-border-radius: 78px;
box-shadow: set 0px -4px 5px rgba(255,255,255,0.2),
set 0px 1px 5px rgba(255,255,255,0.2),
//
0px 12px 0px #231F20,
0px 14px 0px #231F20,
0px 16px 0px #231F20,
//
0px 8px 5px rgba(0,0,0,0.5);
-moz-box-shadow: set 0px -4px 5px rgba(255,255,255,0.2),
set 0px 1px 5px rgba(255,255,255,0.2),
//
0px 12px 0px #231F20,
0px 14px 0px #231F20,
0px 16px 0px #231F20,
//
0px 8px 5px rgba(0,0,0,0.5);
-webkit-box-shadow: set 5px -4px 5px rgba(255,255,255,0.2),
set 5px 1px 5px rgba(255,255,255,0.2),
//
0px 12px 0px #231F20,
0px 14px 0px #231F20,
0px 16px 0px #231F20;
}
.button:hover {
background-color: #B21522;
color: #e3e3e3;
}
.button:active {
: 8px;
box-shadow: set 0px 4px 5px rgba(255,255,255,0.4),
set 0px -1px 5px rgba(255,255,255,0.2),
//
0px 8px 0px #231F20,
//
0px 9px 5px rgba(0,0,0,0.5);
-moz-box-shadow: set 0px 4px 5px rgba(255,255,255,0.4),
set 0px -1px 5px rgba(255,255,255,0.2),
//
0px 8px 0px #231F20,
//
0px 9px 5px rgba(0,0,0,0.5);
-webkit-box-shadow: set 0px 4px 5px rgba(255,255,255,0.4),
set 0px -1px 5px rgba(255,255,255,0.2),
//
0px 8px 0px #231F20,
//
0px 9px 5px rgba(0,0,0,0.5);
}
</style>
</head>
<body>
<div id="contaer">
<a href="#" class="button">开始</a>
<a href="#" class="button">结束</a>
</div>
</body>
</html>
网站设计
- 静宁会SEO的网站建设公司:全面提升您的网络影
- 提升在线业务的关键:选择最佳的丽水网站建设
- 浙江网站优化发展潜力如何
- 井研专业的网站建设公司:打造您的在线品牌
- 灵山SEO网站建设公司:提升您的在线业务表现
- 蒙城网站建设优化公司:提升您网站表现的理想
- 阳谷企业网站优化:提升线上业务力的关键
- 樟树专业的网站建设公司:打造您在线业务的坚
- 通河百度SEO排名的策略与技巧
- 重庆百度快照排名如何进行精准的客户引流
- 重庆百度快照排名
- 常宁便宜的建站公司:助您轻松打造在线业务
- 巫溪百度网站优化:提升网站曝光率与流量的关
- 湖北整站优化怎么做才能放大客户需求
- 闸北网站建设多少钱?全面解析与预算规划
- 辽宁企业网站优化怎么做电话营销