Html 尝试为第1个<;p>;使用具有相同类的sass的div中的元素
下面是我的代码。随着第二个Html 尝试为第1个<;p>;使用具有相同类的sass的div中的元素,html,css,sass,Html,Css,Sass,下面是我的代码。随着第二个变得越来越大胆。我只需要先用黑体字。我不想为第一个添加任何类 .person{ p+p{ 字体大小:粗体; } } 我很好 你也很好 .personp:first of type{}甚至。personp:first child{}可以工作。您正在使用的选择器字面上翻译为“紧跟在class.person中段落之后的段落”。person p:type{}的第一个,甚至是。person p:first child{}可以工作。您使用的选择器字面上翻译为“class.per
变得越来越大胆。我只需要先用黑体字。我不想为第一个
添加任何类
.person{
p+p{
字体大小:粗体;
}
}
我很好
你也很好
.personp:first of type{}
甚至。personp:first child{}
可以工作。您正在使用的选择器字面上翻译为“紧跟在class.person中段落之后的段落”。person p:type{}
的第一个,甚至是。person p:first child{}
可以工作。您使用的选择器字面上翻译为“class.person中紧跟在段落之后的段落”我也会使用p:first类型选择器,我也会使用p:first类型选择器
.person {
p:first-child {
font-weight: bold;
}
}