html标签如下
<ul class="uls">
<li>1 <span class="li-boradiu"></span>
</li>
<li>2 <span class="li-boradiu"></span>
</li>
<li>3</li></ul>
css标签如下
uls{list-style-type: none*zoom: -1}
uls:after{content: ""clear: bothdisplay: block}
uls li{display: blockfloat: leftwidth: 120pxheight: 35pxbackground-color: #4169E1text-align: centerline-height: 35pxcolor: white/*做上圆角*/border-top-left-radius : 15px border-top-right-radius : 15px }
li-boradiu{display: inline-blockwidth: 35pxheight: 35px/*background-color: #4169E1*/background-image: radial-gradient(70px at 17.5px 0, #f00)}
<div>
<p>Test</p>
</div>
<style>
div {
width: 200px
height: 200px
background: #272727
border: 1px #272727 solid
}
p {
width: 158px
line-height: 158px
color: #fff
text-align: center
margin: 20px auto
border-radius: 4px
box-shadow: inset 0px 2px 8px 2px #000000
border: 1px #666 solid
border-left: 1px #131313 solid
border-top: 1px #131313 solid
}
</style>
当圆角过大时深色边和高光边交界处会露陷,要不露陷的话:
边框渐变,貌似支持的浏览器少
不用边框,用两个div嵌套,外面那个比里面那个大1px,然后外面那个用45度的斜方向背景渐变(支持的浏览器多),里面那个用背景色加内阴影。