gpt4 book ai didi

html - 为什么箭头不能在IE7中显示?

转载 作者:太空宇宙 更新时间:2023-11-03 23:53:27 25 4
gpt4 key购买 nike

我发现下面的代码在IE8、IE9和firefox上可以完美运行,但在IE7上运行不佳,向上箭头不显示,为什么?

CSS:

.arrow_box {
position: relative;
background: #88b7d5;
border: 4px solid #c2e1f5;
}
.arrow_box:after, .arrow_box:before {
bottom: 100%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}

.arrow_box:after {
border-color: rgba(136, 183, 213, 0);
border-bottom-color: #88b7d5;
border-width: 30px;
left: 50%;
margin-left: -30px;
}
.arrow_box:before {
border-color: rgba(194, 225, 245, 0);
border-bottom-color: #c2e1f5;
border-width: 36px;
left: 50%;
margin-left: -36px;
}

HTML:

<br/>
<br/>
<br/>
<div class="arrow_box"><h1 class="logo">css arrow please!</h1></div>

最佳答案

IE7 不支持

:before:after 选择器。

您要么必须更改您的 CSS 以不使用 :before:after,或者您可以使用 js shiv 来基本上模拟这些选择器的行为使用javascript。这是一个 post关于如何做到这一点。

关于html - 为什么箭头不能在IE7中显示?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19331465/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com