Pseudo elements allow us to target elements that are not explicitly set in the DOM. Using ::before ::after
we can actually create and manipulate elements in the DOM that do not impact the content. While ::first-letter ::first-line ::selection ::placeholder
allow us to target elements that do not have a specific DOM element.
About ‘blockquote‘:
blockquote { quotes: "“" "”" "‘" "’"; } blockquote::before { content: open-quote; } blockquote::after { content: close-quote; }
About ::first-line, ::first-letter:
p::first-line { color: green; } p::first-letter { font-size: 2em; float: left; line-height: 1.7em; padding: 0 .3em; font-weight: bold; }
原文地址:https://www.cnblogs.com/Answer1215/p/10068269.html
时间: 2024-10-09 19:52:17