0

演示网址:http
: //linjuming.pydra.org/zc_up/index.php?main_page=index&cPath=1_2 我在我的网站中使用 oocss css 框架。一个奇怪的问题出现了。

.complex .tl, .complex .tr {
  height: 32000px;
  margin-bottom: -32000px;
  width: 10px;
}

这些代码来自 stylesheet_010_oocss.css。
但是两个地方继承的不一样。为什么会这样?

在此处输入图像描述

4

1 回答 1

1

规则中的HightWidth属性.complex .tl, .complex .tr会丢失,<div class="sort_line s_box_sort_line complex"> ... </div>因为它的属性是 CSS 中最低位置的重新规则。看一下这个:

/*in LINE 85 */
.complex .tl, .complex .tr {
    height: 32000px;
    margin-bottom: -32000px;
    width: 10px;
}

/*in LINE 1696 */    
.r_box_2 .tl, .r_box_2 .tr, .r_box_2 .bl, .r_box_2 .br {
    height: 6px;
    width: 6px;
}

/*in LINE 2116 */
.s_box_sort_line .tl {
    background-position: -320px -320px;
    height: 32000px;
    width: 10px;
}

我们知道 css 代码是从上到下呈现的。这就是为什么要使用的代码是最新的代码(最低位置)。

于 2012-11-09T08:41:36.877 回答