您可以为所有浏览器设置圆角的CSS
声明,并对旧版本的Internet Explorer使用HTC
。
Working example对于带圆角的div 否position
设置!
CSS
.curved {
-moz-border-radius:10px; /* Firefox */
-webkit-border-radius:10px; /* Safari and chrome */
-khtml-border-radius:10px; /* Linux browsers */
border-radius:10px; /* CSS3 */
behavior:url(border-radius.htc) /* Internet Explorer */
}
.menu_buttons {
margin: 40px;
width: 100px;
line-height: 1.1em;
float: left;
vertical-align: middle;
cursor: pointer;
text-align: center;
font: 0.9em Arial, Helvetica, sans-serif;
color: #fff;
background-color: pink;
border: 1px solid red;
}
实例HTML
<div class="menu_buttons curved">.menu_buttons element</div>
下载border-radius.htc,并检查了CSS curved corner Demos and Page。
测试的
的Windows XP Profissionalversão2002 Service Pack 3的
- 的Internet Explorer 8.0.6001.18702
- 歌剧11.62
- 火狐3.6.16
- Safari浏览器5.1.2
- 谷歌浏览器18.0.1025.168米
- K-Meleon的1.5.4
Windows 7家庭版Service Pack 1
- 的Internet Explorer 9.0.8112.164211C
- 歌剧11.62
- Firefox 12.0
- Safari 5.1.4
- Google Chrome 18.0.1025。168米
Linux操作系统Ubuntu 12.04
- 火狐12.0
- 铬18.0.1025.151(显影剂构建130497的Linux)
[边框RADUIS](HTTP:// WWW .css3.info /预览/圆角边框/)? – Vidul