发布网友 发布时间:2022-04-21 16:15
共4个回答
懂视网 时间:2022-04-21 20:36
@charset "utf-8";/* CSS Document */*{ margin:0px; padding:0px;}body{ background-image: url(../images/bg.jpg); background-repeat:repeat-x; height:1000px; }body>div{ width:900px;}#wrap{ margin:0 auto;}#header{ height:80px; background:#fff;}#hl{ width:550px; height:80px; background:#fff; background-image: url(../images/logo.jpg); background-repeat: no-repeat; float:left; }#hr{ float:right; font-size:8px;}#nav{ background-image: url(../images/dh.jpg); height:30px; border:solid #fff 5px; border-width: 0px 0px 5px 0px;}#logo{ height:300px; background-image: url(../images/1.jpg);}#main{ height:400px; margin-top: 5px;}#ml{ height:400px; width:250px; background-image: url(../images/left.jpg); margin-right: 5px; float:left;}#mr{ height:25px; width:645px; float:right; color:blue;}#gsjj{ background:blue; font-family:"Microsoft YaHei"; font-size: 10px; color:#fff; font-weight: normal;}#footer{ margin-top: 10px; border:solid 1px blue; border-width: 1px 0px 0px 0px; text-align:center;}ul li{ width:100px; height:30px; float:left; color:#fff; list-style-type:none; padding-top: 5px; padding-left: 5px;}
CSS element>element 选择器
CSS element>element 选择器
CSS element>element 选择器
CSS element>element 选择器
index 设为主页|加入收藏
@charset "utf-8";/* CSS Document */*{ margin:0px; padding:0px;}body{ background-image: url(../images/bg.jpg); background-repeat:repeat-x; height:1000px; }body>div{ width:900px;}#wrap{ margin:0 auto;}#header{ height:80px; background:#fff;}#hl{ width:550px; height:80px; background:#fff; background-image: url(../images/logo.jpg); background-repeat: no-repeat; float:left; }#hr{ float:right; font-size:8px;}#nav{ background-image: url(../images/dh.jpg); height:30px; border:solid #fff 5px; border-width: 0px 0px 5px 0px;}#logo{ height:300px; background-image: url(../images/1.jpg);}#main{ height:400px; margin-top: 5px;}#ml{ height:400px; width:250px; background-image: url(../images/left.jpg); margin-right: 5px; float:left;}#mr{ height:25px; width:645px; float:right; color:blue;}#gsjj{ background:blue; font-family:"Microsoft YaHei"; font-size: 10px; color:#fff; font-weight: normal;}#footer{ margin-top: 10px; border:solid 1px blue; border-width: 1px 0px 0px 0px; text-align:center;}ul li{ width:100px; height:30px; float:left; color:#fff; list-style-type:none; padding-top: 5px; padding-left: 5px;}
加了那个后padding无效了
热心网友 时间:2022-04-21 17:44
百度:外边距自动合并
热心网友 时间:2022-04-21 19:02
这是因为你设置了最高级别的边距为0,那么下面的所属内容都会继承上面的定义,除非你单独再为下面的内容重新定义。
热心网友 时间:2022-04-21 20:37
什么意思?说详细点吧