码迷,mamicode.com
首页 > Web开发 > 详细

[CSS3] Target HTML Elements not Explicitly set in the DOM with CSS Pseudo Elements

时间:2018-12-05 02:18:52      阅读:229      评论:0      收藏:0      [点我收藏+]

标签:xpl   lnp   exp   open   actual   conda   ram   close   ecif   

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;
}

 

 

[CSS3] Target HTML Elements not Explicitly set in the DOM with CSS Pseudo Elements

标签:xpl   lnp   exp   open   actual   conda   ram   close   ecif   

原文地址:https://www.cnblogs.com/Answer1215/p/10068269.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!