div+css如何实现圆角矩形

html-css07

div+css如何实现圆角矩形,第1张

具体操作步骤如下:

1、首先打开sublime text软件,新建一个html文件,输入基本的html结构:

2、然后设置一个div,并设置div的class属性,在上方的style中设置样式,设置背景颜色、高度和宽度并设置border边框和边框的圆角属性,完成后保存:

3、最后打开浏览器就可以看到效果:

朋友,我给你来个实例吧,希望采纳答案,谢谢。

CSS代码:

div#nifty{margin:0background:#9BD1FA}p

{padding:10px}div.rtop

{display:blockbackground:#fff}div.rtop

div

{display:blockheight:1pxoverflow:hiddenbackground:#9BD1FA}div.r1{margin:0

5px}div.r2{margin:0

3px}div.r3{margin:0

2px}div.rtop

div.r4

{margin:0

1pxheight:2px}

HTML代码:

div

+

css

圆角矩形

www.865171.cn