t0b*_*man 6 html shape button css3 css-shapes
http://nl.tinypic.com/r/jgm90h/8
我想知道如何使用纯CSS3使HTML按钮标签在上面的链接中具有形状.你能帮助我吗?
诀窍是使用伪类:before和:after.试试这样:
.yourButton {
position: relative;
width:200px;
height:40px;
margin-left:40px;
color:#FFFFFF;
background-color:blue;
text-align:center;
line-height:40px;
}
.yourButton:before {
content:"";
position: absolute;
right: 100%;
top:0px;
width:0px;
height:0px;
border-top:20px solid transparent;
border-right:40px solid blue;
border-bottom:20px solid transparent;
}
.yourButton:after {
content:"";
position: absolute;
left: 100%;
top:0px;
width:0px;
height:0px;
border-top:20px solid transparent;
border-left:40px solid blue;
border-bottom:20px solid transparent;
}
Run Code Online (Sandbox Code Playgroud)
JsFiddle:http://jsfiddle.net/VpW5x/
| 归档时间: |
|
| 查看次数: |
10823 次 |
| 最近记录: |