我有以下代码,它在ie8中运行良好,但不能在Chrome中运行。我想要显示边框,但它不是:
.sitewidth{
width:1000px;
min-height:100%;
height:auto;
margin:0 auto 0 auto;
border-left: 1px #EE6A00 solid;
border-right:1px #EE6A00 solid;
overflow:visible !important;
}
发布于 2011-12-19 13:06:39
这可能是因为它在没有高度的Chrome中显示得不够高?
html代码里有什么?有时,在关闭div之前需要一个<br clear="all" />
,这样整个div才能显示在屏幕上。
如果后面跟着height:auto;
,我不太确定min-height
会有什么影响?
发布于 2011-12-19 13:57:52
首先,请为您的框定义背景色,以确保它可以很好地显示。然后,我建议你先删除其他功能,然后解决你的问题。像这样做:
.box {
background-color:silver;
width:1000px;
height:100px;
border:1px #000 solid;
}
如果这可以很好地工作,您可以使用其他属性对其进行修改。
发布于 2015-02-09 21:53:11
在我的例子中,这是因为我使用了0.5px
而不是1px
。没有半个像素这样的东西。
https://stackoverflow.com/questions/8557294
复制相似问题