Javascript 段落第一个子文本格式
当我删除父div类并将其放在主容器类中时,我面临一个更改第一段格式的问题 类名是Javascript 段落第一个子文本格式,javascript,html,css,Javascript,Html,Css,当我删除父div类并将其放在主容器类中时,我面临一个更改第一段格式的问题 类名是'inside-content'当我把它和容器放在一起时,它就不起作用了,但是当我把它应用到直接的父类时,它就起作用了 我的代码: <div class="container"> <h1> Sample Text</h1> <div class="inside-content"> <p>Our 2011 collection, a
'inside-content'
当我把它和容器放在一起时,它就不起作用了,但是当我把它应用到直接的父类时,它就起作用了
我的代码:
<div class="container">
<h1> Sample Text</h1>
<div class="inside-content">
<p>Our 2011 collection, along with our fully updated range of contract furniture brochures are available to download. For your copy, please click the links shown on the left.</p>
<p>Our 2011 collection, along with our fully updated rtange of contract furniture brochures are available to download. For your copy, please click the links shown on the left.</p>
</div>
</div>
<div class="container inside-content">
<h1> Sample Text</h1>
<p>Our 2011 collection, along with our fully updated range of contract furniture brochures are available to download. For your copy, please click the links shown on the left.</p>
<p>Our 2011 collection, along with our fully updated rtange of contract furniture brochures are available to download. For your copy, please click the links shown on the left.</p>
</div>
示例文本
我们的2011年系列以及我们全面更新的合同家具手册可供下载。对于您的副本,请单击左侧显示的链接
我们的2011系列,以及我们全面更新的rtange合同家具手册可供下载。对于您的副本,请单击左侧显示的链接
示例文本
我们的2011年系列以及我们全面更新的合同家具手册可供下载。对于您的副本,请单击左侧显示的链接
我们的2011系列,以及我们全面更新的rtange合同家具手册可供下载。对于您的副本,请单击左侧显示的链接
输出如下:
非常感谢您的帮助。您应该使用而不是:第一个孩子:
这就是你要找的吗?完全一样。谢谢Sunil。
.inside-content p:first-of-type {
/* your style here */
}