css 怎么搞成li圆角

html-css08

css 怎么搞成li圆角,第1张

在bannerone_one li中加入下面的圆角属性。

border-top-left-radius:5px

border-top-right-radius:5px

-moz-border-radius-topleft:5px

-moz-border-radius-topright:5px

-webkit-border-top-left-radius:5px

-webkit-border-top-right-radius:5px

这些个css属性就ie6/7/8不支持,就像下面所说的,图片兼容最好!

方法一:CSS3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns=" http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/htmlcharset=utf-8" /><meta http-equiv="Content-Language" content="utf-8" /><meta name="robots" content="all" /><meta name="author" content="Tencent-ISRD" /><meta name="Copyright" content="Tencent" /><title>Border-radius</title></head><body><div style="border-width: 1pxborder-style: solid-moz-border-radius: 11px-khtml-border-radius: 11px-webkit-border-radius: 11pxborder-radius: 11pxpadding:5px">在Firefox和Safari 3的浏览器里能看到圆角效果</div></body></html>方法二:CSS2 先做好四个圆角背景图,再定义四个角的类,如:.TL .TR .BL .BR。 四个角使用绝对定位,定位在层的左上、右上、左下、右下位置