为什么继承css属性丢失了?

时间:2012-11-09 08:17:55

标签: css

demo url: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 但两个地方继承的不一样。为什么会发生这种情况?

enter image description here

1 个答案:

答案 0 :(得分:1)

.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代码是从上到下呈现的。这就是为什么使用的代码是最新的代码(最低位置)。

相关问题