关于DIV+CSS超级简单问题,谢谢

来源:百度知道 编辑:UC知道 时间:2024/06/16 11:08:52

.other_left ul {
margin: 0;
padding: 3px 4px 8px 8px;
list-style: none;
}

.other_right ul {
margin: 0;
padding: 3px 4px 8px 8px;
list-style: none;
}
写在一起怎么写?(内容一样的)
抱歉,我说的不够详细,必须这2个DIV,因为下面有对应的DIV
<div class="other_left">
<h6>测试</h6>
<ul><li>测试</li>
</ul>
</div>

<div class="other_right">
<h6>测试</h6>
<ul><li>测试</li>
</ul>
</div>
或者怎么写能更简单些?

.other_left ul .other_right ul {
margin: 0;
padding: 3px 4px 8px 8px;
list-style: none;
}

也可以:
ul {
margin: 0;
padding: 3px 4px 8px 8px;
list-style: none;
}

写在一起,随便,这两个样式不是一样的吗,你用第二个样式也可以用第一个样式,你干吗非得取两个名字,写两个呢?你这样也可以写上一百个名字,样式都一样的,有必要吗?
合在一起:{margin: 0;
padding: 3px 4px 8px 8px;
list-style: none; }
名字随便你取,叫123456789……都可以

把两条合在一起,两条的属性都一样的,干嘛写得那么开呢!!你要分开写也一样!!合在一起也没事!!看你自己怎么想了!如果你想更改某一个的属性的话,那么另一个也会受影响!!看你自己用在什么地方 !!