</div>
33、border:设置DIV的边框样式。
例:
<div style=”border:dotted 2px black; background-color:Yellow; width:100px;height:100px;”>
</div>
说明:border后跟边框的样式、宽度、颜色等属性。还可以用以下属性分别设置。
34、border-width:设置边框的宽度。
35、border-color:设置边框的颜色。
36、border-style:设置边框的样式。
例:
<label style=”font-size:14px;”>选择样式:</label>
<select id=”bstyle” onchange=”document.getElementById(‘tdd’).style.
borderStyle=this.options[this.selectedIndex].text;”>
<option selected=”selected”>none</option>
<option>dashed</option>
<option>dotted</option>
<option>groove</option>
<option>hidden</option>
<option>inset</option>
<option>outset</option>
<option>ridge</option>
<option>double</option>
<option>solid</option>
</select>
<div id=”tdd” style=”border-style:none; border-width:5px; border-color:Black; width:100px;height:100px;background-color:Yellow;”>
</div>
说明:border是对四个边框同时进行设置。也可以单独对某一边或几个边进行设置,此时用以下属性:
border-top:设置上边框样式。
37、border-bottom:设置下边框样式。
38、border-left:设置左边框样式。
39、border-right:设置右边框样式。
说明:某一边框的某一样式也可单独设置,以上边框为例可以用:border-top-style、border-top-width、border-top-color来分别设置,由于使用各border相同,所以不在举例说明。
40、display:设置显示属性。其值有block、none。
41、float:设置DIV在页面上的流向,其值有left(靠左显示)、right(靠右显示)、none。
50、background:设置DIV的背景样式。
例:
<div style=”width:600px;height:200px; background:yellow url(mw3.jpg) repeat scroll;
overflow:auto”>
<div style=”width:2px;height:1000px;”></div>
</div>
说明:background后可直接跟背景的颜色、背景图片、平铺方式等样式。也可以用以下属性分别设置。
51、background-color:设置背景颜色。
52、background-attachment:背景图像的附加方式,其值有scroll、fixed。
53、background-image:指定使有的背景图片。
54、background-repeat:背景图象的平铺方式。其值有no-repeat(不平铺)、repeat(两个方向平铺)、
repeat-x(水平方向平铺)、repeat-y(垂直方向平铺)。
55、background-position:在DIV中定位背景位置。其值有top bottom left right的不同组合。也可以以用坐标










