删除Paragrahps之间的空格

时间:2016-08-18 10:32:49

标签: html css

下面的代码段中有3个段落。

如果您运行以下代码段,则可以在两个段落之间看到更多空格。我想减少这些空间。

如果删除<br/>标签,则不会显示任何空格,但我希望保留一点空间。

<p>sitename brings you the stylish and trendy <b>God Created the Earth Apple Iphone 5s Phone case</b> made up with top quality Plycarbonae hard case. With all sitename mobile back cover for your <b>Apple Iphone 5s</b>, you can ensure optimum protection for your <b>Iphone 5s</b> from scratches and drop protection keeping all the awesome design to showoff to the world. We never compromise with the quality of design or with our phone cases so you always receive best phone cover for your beautiful <b>Apple Iphone 5s.</b></p>
<br/>
<p>We have many more cool, latest and trendy designs available for your <b>Apple iphone 5s</b> device. You can explore all our best designer <b><a href="http://sitename.com/cases-covers/apple-iphone-5s.html"><span style="color:#0000FF;">Apple Iphone 5s Phone Case and Cover here</a></b></p>
<br/>
<ul>
<li>All Style Baby&rsquo;s <b>Apple iphone 5s</b> Cases and Covers tested for quality before we dispatch from here.</li>
<li>sitename Mobile Covers are highly protective, fashionable and trendy.</li>
<li><b>God Created the Earth Apple Iphone 5s Phone case</b> fits perfectly to your Apple iphone 5s.</li>
<li>sitename <b>Apple iphone 5s</b> Phone Covers are made from Poly Carbonate and are strong and durable.</li>
<li>This Apple iphone 5s Mobile Back cover designs Cases are less bulky and lightweight.</li>
</ul>
<p>Don&rsquo;t like this Design? Explore all other designs for your <b><a href="http://sitename.com/cases-covers/apple-iphone-5s.html"><span style="color:#0000FF;">designs for your Apple Iphone 5s here<span></a></b></p>

3 个答案:

答案 0 :(得分:0)

删除p代码

的默认边距和填充

&#13;
&#13;
p { margin:0; padding:0; }
&#13;
<p>We brings you the stylish and trendy <b>God Created the Earth Apple Iphone 5s Phone case</b> made up with top quality Plycarbonae hard case. With all we mobile back cover for your <b>Apple Iphone 5s</b>, you can ensure optimum protection for your <b>Iphone 5s</b> from scratches and drop protection keeping all the awesome design to showoff to the world. We never compromise with the quality of design or with our phone cases so you always receive best phone cover for your beautiful <b>Apple Iphone 5s.</b></p>
<br/>
<p>We have many more cool, latest and trendy designs available for your <b>Apple iphone 5s</b> device. You can explore all our best designer <b><a href="http://we.com/cases-covers/apple-iphone-5s.html"><span style="color:#0000FF;">Apple Iphone 5s Phone Case and Cover here</a></b></p>
<br/>
<ul>
<li>All we &rsquo;s <b>Apple iphone 5s</b> Cases and Covers tested for quality before we dispatch from here.</li>
<li>we Mobile Covers are highly protective, fashionable and trendy.</li>
<li><b>God Created the Earth Apple Iphone 5s Phone case</b> fits perfectly to your Apple iphone 5s.</li>
<li>we<b>Apple iphone 5s</b> Phone Covers are made from Poly Carbonate and are strong and durable.</li>
<li>This Apple iphone 5s Mobile Back cover designs Cases are less bulky and lightweight.</li>
</ul>
<p>Don&rsquo;t like this Design? Explore all other designs for your <b><a href="http://we.com/cases-covers/apple-iphone-5s.html"><span style="color:#0000FF;">designs for your Apple Iphone 5s here<span></a></b></p>
&#13;
&#13;
&#13;

答案 1 :(得分:0)

默认情况下,

<P>个元素有一些余量。 将css margin: 5px 0px;添加到其中。 将它增加/减少到你想要的数量。

答案 2 :(得分:0)

从代码中删除</br>。段落具有默认边距bottomtop

paragraph移除默认保证金并保留</br>

(第一种方法更好,因为你不需要添加新的css来覆盖某些样式)

<p>Stylename brings you the stylish and trendy <b>God Created the Earth Apple Iphone 5s Phone case</b> made up with top quality Plycarbonae hard case. With all sitename mobile back cover for your <b>Apple Iphone 5s</b>, you can ensure optimum protection for your <b>Iphone 5s</b> from scratches and drop protection keeping all the awesome design to showoff to the world. We never compromise with the quality of design or with our phone cases so you always receive best phone cover for your beautiful <b>Apple Iphone 5s.</b></p>

<p>We have many more cool, latest and trendy designs available for your <b>Apple iphone 5s</b> device. You can explore all our best designer <b><a href="http://sitename.com/cases-covers/apple-iphone-5s.html"><span style="color:#0000FF;">Apple Iphone 5s Phone Case and Cover here</a></b></p>

<ul>
<li>All sitename&rsquo;s <b>Apple iphone 5s</b> Cases and Covers tested for quality before we dispatch from here.</li>
<li>sitename Mobile Covers are highly protective, fashionable and trendy.</li>
<li><b>God Created the Earth Apple Iphone 5s Phone case</b> fits perfectly to your Apple iphone 5s.</li>
<li>sitename <b>Apple iphone 5s</b> Phone Covers are made from Poly Carbonate and are strong and durable.</li>
<li>This Apple iphone 5s Mobile Back cover designs Cases are less bulky and lightweight.</li>
</ul>
<p>Don&rsquo;t like this Design? Explore all other designs for your <b><a href="http://sitename.com/cases-covers/apple-iphone-5s.html"><span style="color:#0000FF;">designs for your Apple Iphone 5s here<span></a></b></p>