:first-letter 读取 <img> 标签
The :first-letter reads <img> tag
我的段落 <p>
以 <img>
开头,因此 p:first-letter
不适用于 <img>
之后的文本
如果我删除 <img>
,它确实有效。
您可以将文本换行到任何中性 html 标记,然后使用字母间距。这只是使用 CSS.
解决此问题的一种方法
这是不可能的
The ::first-letter pseudo-element represents the first letter of an
element, if it is not preceded by any other content (such as images or
inline tables) on its line.
我的段落 <p>
以 <img>
开头,因此 p:first-letter
不适用于 <img>
如果我删除 <img>
,它确实有效。
您可以将文本换行到任何中性 html 标记,然后使用字母间距。这只是使用 CSS.
解决此问题的一种方法这是不可能的
The ::first-letter pseudo-element represents the first letter of an element, if it is not preceded by any other content (such as images or inline tables) on its line.