We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
上一期提到了 ::first-letter 这个伪元素,这一期介绍 ::first-line。
::first-letter
::first-line
::first-line 意为“首行文本”,利用它可以向文本的首行添加特殊样式,它会作用于设置元素中的第一行文本的样式,而不论该行出现多少单词。
<textarea>当前段落的首行文字为红色、加粗、微软雅黑字体。使用了 <code>::first-line</code> 伪元素。调整容器宽度,无论段落变成多少行,第一行文字始终是红色。 </textarea>
textarea { color: #666; resize: both; } textarea::first-line {color: red;}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
上一期提到了
::first-letter
这个伪元素,这一期介绍::first-line
。::first-line
意为“首行文本”,利用它可以向文本的首行添加特殊样式,它会作用于设置元素中的第一行文本的样式,而不论该行出现多少单词。The text was updated successfully, but these errors were encountered: