CSS 边框不会在 IE 中显示

发布于 2024-08-22 19:25:27 字数 2644 浏览 1 评论 0原文

.xboxcontent {
display:block;
 background:#000000; 
 border:3px solid #fff; 
 border-width:0 3px;
 }
 .xsnazzy h1, .xsnazzy h2, .xsnazzy p {margin:0 10px; letter-spacing:1px;}
.xsnazzy h1 {font-size:2.5em; color:#fc0;}
.xsnazzy h2 {font-size:2em; color:#234; border:0;}
.xsnazzy p {padding-bottom:0.5em; color:#eee;}
.xsnazzy h2 {padding-top:0.5em; padding-left:10px;}
.xsnazzy {background: transparent; margin:1em;}
.xsnazzy em {display:block; width:0; height:0; color:#d8d8ee; overflow:hidden; border-top:12px solid #fff; border-left:12px dotted transparent; border-right:12px dotted transparent; margin-left:50px;}
/* hack for IE5.5 */
* html .xsnazzy em {width:24px; height:12px; w\idth:0; hei\ght:0;}
.xsnazzy span {display:block; width:0; height:0; color:#fff; overflow:hidden; border-top:10px solid #000000; border-left:10px dotted transparent; border-right:10px dotted transparent; margin-left:52px; margin-top:-15px;}
* html .xsnazzy span {width:20px; height:10px; w\idth:0; hei\ght:0;}
 .xb1, .xb2, .xb3, .xb4, .xb5, .xb6, .xb7 {display:block; overflow:hidden; font-size:0;}
.xb1, .xb2, .xb3, .xb4, .xb5, .xb6 {height:1px;}
.xb4, .xb5, .xb6, .xb7 {background:#ccc; border-left:1px solid #fff; border-right:1px solid #fff;}
.xb1 {margin:0 8px; background:#fff;}
.xb2 {margin:0 6px; background:#fff;}
.xb3 {margin:0 4px; background:#fff;}
.xb4 {margin:0 3px; background:#000000; border-width:0 5px;}

.xb5 {margin:0 2px; background:#000000; border-width:0 4px;}
.xb6 {margin:0 2px; background:#000000; border-width:0 3px;} 
.xb7 {margin:0 1px; background:#000000; border-width:0 3px; height:2px;} 

结果是: http://img121.imageshack.us/img121/3583/ffwork.png

在 FF 中..但当然是愚蠢的 IE: http://img39.imageshack.us/img39/6628/ieno.png

为什么会发生这种情况以及如何解决这个问题..

没有涉及图像。

<div class="xsnazzy">
<b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b><b class="xb5"></b><b class="xb6"></b><b class="xb7"></b>
<div class="xboxcontent">
<p>
Hello, my name is Azzyh
</p>
</p>
</div>
<b class="xb7"></b><b class="xb6"></b><b class="xb5"></b><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"></b>
<em></em><span></span></div>
.xboxcontent {
display:block;
 background:#000000; 
 border:3px solid #fff; 
 border-width:0 3px;
 }
 .xsnazzy h1, .xsnazzy h2, .xsnazzy p {margin:0 10px; letter-spacing:1px;}
.xsnazzy h1 {font-size:2.5em; color:#fc0;}
.xsnazzy h2 {font-size:2em; color:#234; border:0;}
.xsnazzy p {padding-bottom:0.5em; color:#eee;}
.xsnazzy h2 {padding-top:0.5em; padding-left:10px;}
.xsnazzy {background: transparent; margin:1em;}
.xsnazzy em {display:block; width:0; height:0; color:#d8d8ee; overflow:hidden; border-top:12px solid #fff; border-left:12px dotted transparent; border-right:12px dotted transparent; margin-left:50px;}
/* hack for IE5.5 */
* html .xsnazzy em {width:24px; height:12px; w\idth:0; hei\ght:0;}
.xsnazzy span {display:block; width:0; height:0; color:#fff; overflow:hidden; border-top:10px solid #000000; border-left:10px dotted transparent; border-right:10px dotted transparent; margin-left:52px; margin-top:-15px;}
* html .xsnazzy span {width:20px; height:10px; w\idth:0; hei\ght:0;}
 .xb1, .xb2, .xb3, .xb4, .xb5, .xb6, .xb7 {display:block; overflow:hidden; font-size:0;}
.xb1, .xb2, .xb3, .xb4, .xb5, .xb6 {height:1px;}
.xb4, .xb5, .xb6, .xb7 {background:#ccc; border-left:1px solid #fff; border-right:1px solid #fff;}
.xb1 {margin:0 8px; background:#fff;}
.xb2 {margin:0 6px; background:#fff;}
.xb3 {margin:0 4px; background:#fff;}
.xb4 {margin:0 3px; background:#000000; border-width:0 5px;}

.xb5 {margin:0 2px; background:#000000; border-width:0 4px;}
.xb6 {margin:0 2px; background:#000000; border-width:0 3px;} 
.xb7 {margin:0 1px; background:#000000; border-width:0 3px; height:2px;} 

the result of this is:
http://img121.imageshack.us/img121/3583/ffwork.png

in FF.. but ofcourse stupid IE:
http://img39.imageshack.us/img39/6628/ieno.png

Why is this happening and how to solve this..

Theres no images involved.

<div class="xsnazzy">
<b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b><b class="xb5"></b><b class="xb6"></b><b class="xb7"></b>
<div class="xboxcontent">
<p>
Hello, my name is Azzyh
</p>
</p>
</div>
<b class="xb7"></b><b class="xb6"></b><b class="xb5"></b><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"></b>
<em></em><span></span></div>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

始终不够爱げ你 2024-08-29 19:25:27

尝试指定 .xboxcontent 的宽度和高度 - 以像素或百分比为单位。

Try specifying a width and height for your .xboxcontent - either in pixels or percentages.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文