这里边框可以设置粗细,颜色,还有线型,那填充部分边界部分怎么设置不了颜色等其他属性
我觉得用background color可以达到你要的效果
<!DOCTYPE html>
<html>
<head>
<title>Box example</title>
<style type="text/css">
/* No borders set */
ul {
background: yellow;
margin: 12px 12px 12px 12px;
padding: 3px 3px 3px 3px
}
/* No borders set */
li {
color: white; /* text color is white */
background: blue; /* Content, padding will be blue */
margin: 12px 12px 12px 12px;
padding: 12px 0px 12px 12px; /* Note 0px padding right */
list-style: none /* no glyphs before a list item */
}
li.withborder {
/*border-style: ridge;*/
/*border-width: medium;*/ /* sets border width on all sides */
/*border-color: lime;*/
border-style:none
}
</style>
</head>
<body>
<ul>
<li>First element of list</li>
<li class="withborder">Second element of list is
a bit longer to illustrate wrapping.</li>
</ul>
</body>
</html>
padding:0px;
border:10px solid blue;
补充楼上
border:10px solid blue; 你可以选择加大边框像素,从而仔细了解颜色的变换