gpt4 book ai didi

css - 我可以在后面嵌套伪元素吗?

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

我从 W3C 找到的。 http://www.w3.org/TR/css3-content/#nesting

4.2.1. Nesting '::before' and '::after' pseudo-elements

The selector '::before::before' represents a pseudo-element contained at the start of a pseudo-element contained at the start of an element.For example, the following rules:div { content: 'A' }div::before { content: 'B'; }div::before::before { content: 'C'; }...would result in the following rendering objects:

,-----------------------.
| ,---------. |
| | ,---. | |
| | | C | B | A |
| | `---' | |
| `---------' |
`-----------------------'

但它在 Chrome 30 中不起作用。http://codepen.io/tychio/pen/pLDqm

所以我只想问一下如何使用after或者before来嵌套。

最佳答案

的确,该模块已被提出,但不幸的是没有被任何浏览器实现。

所以现在你不能这样做。

编辑:刚刚找到this post

关于css - 我可以在后面嵌套伪元素吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19535216/

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