css表单列表框

html-css011

css表单列表框,第1张

list-styleCSS1IE4+ , NS4+有复合属性。设置列表项目相关内容list-style-imageCSS1IE4+ , NS6+有设置或检索作为对象的列表项标记的图像list-style-positionCSS1IE4+ , NS6+有设置或检索作为对象的列表项标记如何根据文本排列list-style-typeCSS1/CSS2IE4+ , NS4+有设置或检索对象的列表项所使用的预设标记marker-offsetCSS2NONE无设置或检索标记容器和主容器之间水平补白。即两个容器靠近的一边的间距

css中加边框,首先我们需要确定你要加边框的元素的id或者是id,还有你必须保证这个元素是块级元素,不然width和height对它是无效的,自然也没边框,通过加display:block这个属性,来改成块级元素,具体看代码:

<html>

<head>

<style>

.div1{ //div本身就是块级,所以不需要,算span这中标签就是行级,所以需要display:block

width:600px

height:200px

font-size:13px

border:1px solid #f00

}

</head>

<body>

<div class='div1'>

</div>

</body>

</html>

你只设定了颜色和宽度,但你却没有设置边框样式

border-style: solid

加上这个,或者其它你想要的边框样式

而且你那一堆可以简写

#divInfo table{

margin:10px

border-top-width: 4px

border-right-width: 4px

border-bottom-width: 4px

border-left-width: 4px

border-top-color: red

border-right-color: red

border-bottom-color: red

border-left-color: red

}

写成

#divInfo table{

margin:10px

border: solid 4px Red

}

就可以了