Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/417.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/89.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 段落第一个子文本格式_Javascript_Html_Css - Fatal编程技术网

Javascript 段落第一个子文本格式

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

当我删除父div类并将其放在主容器类中时,我面临一个更改第一段格式的问题

类名是
'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 */
}