当前第2页 返回上一页
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | <!DOCTYPE html>
<html>
<head>
<meta charset= "UTF-8" >
<title></title>
<style type= "text/css" >
.btn{
width: 100px;
height: 30px;
background: green;
border: none;
color: white;
margin: 6px 10px;
}
.btnStyle1{
border-radius: 6px;
}
.btnStyle2{
border-radius: 26px 6px;
}
.btnStyle3{
border-radius: 6px 26px 60px;
}
.btnStyle4{
border-radius: 6px 126px 236px 346px;
}
.bolder{
border: solid 1px green;
width: 500px;
height: 40px;
border-radius: 10px;
}
</style>
</head>
<body>
<p class = "bolder" >
<button class = "btn btnStyle1" >按钮1</button>
<button class = "btn btnStyle2" >按钮2</button>
<button class = "btn btnStyle3" >按钮3</button>
<button class = "btn btnStyle4" >按钮4</button>
</p>
</body>
</html>
|
有时候border-radius会失效
解决办法:万能的!important;
在border-radius属性里面添加 !important,让浏览器首选执行这个语句
1 | border-radius: 6px !important;
|
CSS中的!important一般都是用于对低版本的除了iE 6 ,用来做hack的,后面缀上了!important的css语句,让浏览器首选执行这个语句,因为css有继承的样式,加上!importanrt可以覆盖父级的样式。
推荐:《HTML视频教程》
以上就是css样式怎么把按钮变圆的详细内容,更多文章请关注木庄网络博客!
返回前面的内容
相关阅读 >>
css 怎么设置全屏背景图片
css怎么去掉select箭头
css设置主动控件的样式(焦点伪类的实现)
css sprites如何使用?
css如何改字体
什么是web安全色?
css怎么实现不定宽水平居中
css盒子中的图如何居中
css column-rule属性怎么用
css height:auto 不起作用怎么办
更多相关阅读请进入《css》频道 >>
人民邮电出版社
本书对 Vue.js 3 技术细节的分析非常可靠,对于需要深入理解 Vue.js 3 的用户会有很大的帮助。——尤雨溪,Vue.js作者
转载请注明出处:木庄网络博客 » css样式怎么把按钮变圆