gpt4 book ai didi

css - 为什么内容跨越 :after {content: ' ' } is put inside span and not after?

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

为什么这个 CSS ...

.sticky-info span:after {content: 'test';}

...结果...

<div class="sticky-info"><span>Price <strong>&euro;120</strong>::after</span>

有没有办法得到content:'test'在每个 </span> 后面里面<div class="sticky-info">里面有几个span <div class="sticky-info">

最佳答案

你可以这样做:

<div class="sticky-info">
<span>Price <strong>&euro;120</strong></span>
</div>

CSS:

.sticky-info:after {content: 'test';}

关于css - 为什么内容跨越 :after {content: ' ' } is put inside span and not after?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28539951/

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