【发布时间】:2012-05-10 20:41:53
【问题描述】:
我在 DW 中有一个黑色背景的页面。在页面的设计视图中,页面显示为白色而不是黑色。我不确定这是为什么。我可以将内联样式添加到整个页面,如下所示使页面变黑:
<body>
<div style="background-color:#000" class="wrap_fullwidth">
<div style="background-color:#000" class="center">
<div style="background-color:#000" class="img-center">
<img src="image.jpg" alt="Image" />
</div>
<p style="background-color:#000"> </p>
</div>
</div>
</div>
</body>
这里是页面的 CSS 和它通常的方式:
html, body{
font-size:16px;
font-family:"Lucida Grande", Helvetica, Arial, sans-serif;
line-height:23px;
color:#f3f3f3;
background:#000;
}
.wrap_fullwidth {width:100%; position:relative; float:left;
clear:both; padding-top:20px; }
.center{width:940px; position:relative; margin:0 auto;
clear:both; padding:0px 10px; display:block;}
p{ margin-bottom:20px; text-align:justify;}
.img-center{ text-align: center; }
设计视图应该显示页面,因为它显示为 css 等。我不明白为什么当 css 清楚地显示黑色作为背景时显示白色。好消息是浏览器中的页面正确显示,但如果我在设计视图中工作,这会让事情变得很痛苦。 (我确实使用过)
关于如何解决此问题的想法或想法?
注意:CS5 和 CS5.5 没有这种行为。只有CS6。
【问题讨论】:
-
没有看到提供的代码的问题(我什至删除了背景颜色的内联样式。如果它重要的话,在 Mac Lion 上的 CS6 中尝试过。FWIW:您可能想尝试在html,body 样式定义而不仅仅是背景。另外,请发布您正在使用的完整代码,可能还有其他问题导致您看到的内容。
-
@DaniloCelic - 感谢您的回复,我明白了。看我的回答。
标签: dreamweaver