这是我的问题http://jsfiddle.net/v2q4e/show/和
的小提琴在下面找到我的HTML:
<div class="c-panel">
<div class="c-panel-section-body">
<div class="c-data-entry">
<span id="span1" class="c-hide c-label">
<label id="lbl1">Account</label>
</span>
</div>
</div>
</div>
我担心跨度#span1,我希望它被隐藏起来。在除了原生IE7之外的所有浏览器中,它都是隐藏的(未显示),即使在IE8的兼容模式下加上IE8的IE7模式,它也显示隐藏。
在下方查找所有其他浏览器如何找到针对该范围应用的规则:Click here
在IE7中,我找到了以下适用规则的矿工:
Case 1: When div c-data-entry after div.panel-section-body is not present, the label Account appears :
----------------------------------------------------------------------------------------------------
/* Rule 629 of http://localhost:8030/be/1.1/css/be-core.css */
DIV.c-panel .c-hide { DISPLAY: none}
/* Rule 630 of http://localhost:8030/be/1.1/css/be-core.css */
DIV.c-panel-section-body .c-hide { DISPLAY: none}
/* Rule 81 of http://localhost:8030/be/1.1/css/be-ie67.css */
.ie7 SPAN.c-label { ZOOM: 1}
/* Rule 627 of http://localhost:8030/be/1.1/css/be-core.css */
.c-hide { DISPLAY: none}
Case 2: When div c-data-entry after div.panel-section-body is present, the label Account appears :
-------------------------------------------------------------------------------------------------
/* Rule 319 of http://localhost:8030/be/1.1/css/be-core.css */
.c-data-entry SPAN.c-label {
PADDING-RIGHT: 0px;
DISPLAY: block;
PADDING-LEFT: 0px;
FONT-WEIGHT: bold;
PADDING-BOTTOM: 2px;
PADDING-TOP: 8px
}
/* Rule 629 of http://localhost:8030/be/1.1/css/be-core.css */
DIV.c-panel .c-hide { DISPLAY: none}
/* Rule 630 of http://localhost:8030/be/1.1/css/be-core.css */
DIV.c-panel-section-body .c-hide { DISPLAY: none}
/* Rule 81 of http://localhost:8030/be/1.1/css/be-ie67.css */
.ie7 SPAN.c-label { ZOOM: 1}
/* Rule 627 of http://localhost:8030/be/1.1/css/be-core.css */
.c-hide { DISPLAY: none}
Case 3: When div.c-data-entry after div.panel-section-body is not present, but added new “rule like 630” below:
-------------------------------------------------------------------
/* Rule 630 of http://localhost:8030/be/1.1/css/be-core.css */
DIV.c-panel SPAN.c-hide { DISPLAY: none}
/* Rule 319 of http://localhost:8030/be/1.1/css/be-core.css */
.c-data-entry SPAN.c-label { PADDING-RIGHT: 0px; DISPLAY: block; PADDING-LEFT: 0px; FONT-WEIGHT: bold; PADDING-BOTTOM: 2px; PADDING-TOP: 8px}
/* Rule 629 of http://localhost:8030/be/1.1/css/be-core.css */
DIV.c-panel .c-hide { DISPLAY: none}
/* Rule 631 of http://localhost:8030/be/1.1/css/be-core.css */
DIV.c-panel-section-body .c-hide { DISPLAY: none}
/* Rule 81 of http://localhost:8030/be/1.1/css/be-ie67.css */
.ie7 SPAN.c-label { ZOOM: 1}
/* Rule 627 of http://localhost:8030/be/1.1/css/be-core.css */
.c-hide { DISPLAY: none}
我在右侧点击原生IE7开发者工具中的span标签时使用“应用样式”来接受此订单。
我的问题是:我希望隐藏span#span1(就像在其他浏览器中一样),而不需要添加新规则,如第3种情况所示。
有人可以解释为什么IE7会适用规则319,与规则629或规则631相比,它在同一档案中排在首位吗?
我在这里错过了一些基本知识吗?请指教。