您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

CSS选择器,涉及伪类的第一个孩子和dropcap

CSS选择器,涉及伪类的第一个孩子和dropcap

如果可以使用CSS3选择器,请尝试使用这些选择器(组合在一起):

/* Select the first child if it's not a .quote */
article > p:not(.quote):first-child:first-letter, 
/* Or, if the first child is a .quote, select the following one instead */
article > p.quote:first-child + p:first-letter
{
 float: left;
 font-family: Georgia, serif;
 font-size: 360%;
 line-height: 0.85em;
 margin-right: 0.05em;
}

否则,我认为您必须进行一些替代才能获得所需的效果

CSS 2022/1/1 18:17:44 有510人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶