gpt4 book ai didi

html - :before element misplaced

转载 作者:行者123 更新时间:2023-11-28 12:45:13 25 4
gpt4 key购买 nike

我不明白为什么它在 IE9 和 IE10 上不起作用。它适用于其他浏览器,但不适用于那些浏览器。这是我的问题:

s
(来源:d.pr)

.briefing h3 {
margin-bottom: 23px;
border-bottom: 3px double #9f9c9b;
position: relative;
padding-bottom: 22px;
padding-left: 40px;
}

.briefing h3:before {
content: url('../img/general-title-decoration-white.svg?1370978950');
width: 25px;
display: block;
top: 2px;
left: 0;
position: absolute;
}

我也在主页上使用这种技术进行字幕装饰。除了它有效:


(来源:d.pr)

使用此代码:

.special-title {
font-size: 24px;
color: #a4a19e;
line-height: 1.2;
position: relative;
padding: 8px 0 8px 38px;
border-top: 1px solid #e2dbcf;
border-bottom: 1px solid #e2dbcf;
margin-top: 49px;
margin-bottom: 25px;
}

.special-title:before {
content: url('../img/general-title-decoration.svg?1369571463');
position: absolute;
width: 28px;
height: 28px;
left: 0;
top: 10px;
}

我试图查看差异,但我不明白。

此外,伪元素不会出现在我的 IE 控制台上,因此测试起来有点困难(尤其是使用 browserstack)。

有什么想法吗?我被困在那里。

Here is the page where the problem appears

And the page where it doesn't

非常感谢。 :)

最佳答案

您是否尝试过不定位 :before 元素 absolute?只要你不定义 display:block;

,它应该没有它就可以定位

此外,这两种情况的区别在于您在第一种情况下设置了 display:block;

关于html - :before element misplaced,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17408511/

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