Is there a way in the newer CSS standards to provide round borders? It is not possible in CSS level 2.
Yes. CSS3 already has it.
Many browsers already have it.
-moz-border-radius
though they are transitioning to border-radius
. -webkit-border-radius
. border-radius
(IE8 and below don't support it at all). border-radius
in all browsers. At the moment it's a good idea to use all three, plus -o-border-radius
if you're worried about Opera.
Border-radius: create rounded corners with CSS!
This box should have a rounded corners for Firefox, Safari/Chrome, Opera and IE9. The code for this example is, in theory, quite simple:
#example1 {
border-radius: 15px;
}
However, for the moment, you'll also need to use the -moz- prefix to support Firefox (see the browser support section of this article for further details):
#example1 {
-moz-border-radius: 15px;
border-radius: 15px;
}
Thomas Rutter所说的 ,加上这里是一个方便的资源,因为WebKit和Gecko对top-left
等事物使用不同的属性。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.