似乎<hr />创建换行符

时间:2014-09-22 08:05:36

标签: html html5

&#34; hr&#34; element创建新行,类似于段落元素&#34; p&#34; ?因为我添加了一个&#34; hr&#34;元素到我的表元素,它给出了如下图所示的结果:

enter image description here

编辑:

<fieldset style="border: solid 1px "><legend>alertes offres/demandes</legend>
<div><a href="service.php?action=ServiceAjouterAlerteOD"><img src="http://localhost/bazarmada/pages/img/icons/plus.png" alt="Ajouter un alerte d'abonnement" /></a></div>
<div style="background-color:#cafbb7;"><b>March&eacute; : </b>Ambalavao</div>
<table width="100%">
    <tr>
        <td align="center" width="25%">Mardi</td>
        <td align="center" width="60%">Akotry</td>
        <td align="center" width="5%"><input type="checkbox" value="12" checked onchange="aboDesabo($(this), $(this).val(), 'Akotry');" /></td>
        <td align="center" width="5%"><a href="service.php?action=ServiceAjouterAlerteOD&id=12"><img src="http://localhost/bazarmada/pages/img/icons/edit.png" alt="Modifier" style="height:10px;width:10px;" /></a></td>
        <td align="center" width="5%"><a id="a_del" href="#" onclick="ask(12);"><img src="http://localhost/bazarmada/pages/img/icons/cross.png" alt="Supprimer" style="height:10px;width:10px;" /></a></td>
    </tr>
    <tr>
        <td align="center" width="25%"></td>
        <td align="center" width="60%">Akotry gasy</td>
        <td align="center" width="5%"><input type="checkbox" value="13"  onchange="aboDesabo($(this), $(this).val(), 'Akotry gasy');" /></td>
        <td align="center" width="5%"><a href="service.php?action=ServiceAjouterAlerteOD&id=13"><img src="http://localhost/bazarmada/pages/img/icons/edit.png" alt="Modifier" style="height:10px;width:10px;" /></a></td>
        <td align="center" width="5%"><a id="a_del" href="#" onclick="ask(13);"><img src="http://localhost/bazarmada/pages/img/icons/cross.png" alt="Supprimer" style="height:10px;width:10px;" /></a></td>
    </tr>
    <tr>
        <td align="center" width="25%"></td>
        <td align="center" width="60%">Akotry sebota</td>
        <td align="center" width="5%"><input type="checkbox" value="14"  onchange="aboDesabo($(this), $(this).val(), 'Akotry sebota');" /></td>
        <td align="center" width="5%"><a href="service.php?action=ServiceAjouterAlerteOD&id=14"><img src="http://localhost/bazarmada/pages/img/icons/edit.png" alt="Modifier" style="height:10px;width:10px;" /></a></td>
        <td align="center" width="5%"><a id="a_del" href="#" onclick="ask(14);"><img src="http://localhost/bazarmada/pages/img/icons/cross.png" alt="Supprimer" style="height:10px;width:10px;" /></a></td>
    </tr>
    <tr>
        <td align="center" width="25%"></td>
        <td align="center" width="60%">Akotry tsipala</td>
        <td align="center" width="5%"><input type="checkbox" value="15" checked onchange="aboDesabo($(this), $(this).val(), 'Akotry tsipala');" /></td>
        <td align="center" width="5%"><a href="service.php?action=ServiceAjouterAlerteOD&id=15"><img src="http://localhost/bazarmada/pages/img/icons/edit.png" alt="Modifier" style="height:10px;width:10px;" /></a></td>
        <td align="center" width="5%"><a id="a_del" href="#" onclick="ask(15);"><img src="http://localhost/bazarmada/pages/img/icons/cross.png" alt="Supprimer" style="height:10px;width:10px;" /></a></td>
    </tr>
</table>
<div style="background-color:#cafbb7;"><b>March&eacute; : </b>Merimandroso</div>
<table width="100%">
    <tr>
        <td align="center" width="25%">Lundi</td>
        <td align="center" width="60%">Peta kofehy</td>
        <td align="center" width="5%"><input type="checkbox" value="11" checked onchange="aboDesabo($(this), $(this).val(), 'Peta kofehy');" /></td>
        <td align="center" width="5%"><a href="service.php?action=ServiceAjouterAlerteOD&id=11"><img src="http://localhost/bazarmada/pages/img/icons/edit.png" alt="Modifier" style="height:10px;width:10px;" /></a></td>
        <td align="center" width="5%"><a id="a_del" href="#" onclick="ask(11);"><img src="http://localhost/bazarmada/pages/img/icons/cross.png" alt="Supprimer" style="height:10px;width:10px;" /></a></td>
    </tr>
    <tr><td colspan="5"><hr /></td></tr>
    <tr>
        <td align="center" width="25%">Jeudi</td>
        <td align="center" width="60%">Rary penjy</td>
        <td align="center" width="5%"><input type="checkbox" value="19" checked onchange="aboDesabo($(this), $(this).val(), 'Rary penjy');" /></td>
        <td align="center" width="5%"><a href="service.php?action=ServiceAjouterAlerteOD&id=19"><img src="http://localhost/bazarmada/pages/img/icons/edit.png" alt="Modifier" style="height:10px;width:10px;" /></a></td>
        <td align="center" width="5%"><a id="a_del" href="#" onclick="ask(19);"><img src="http://localhost/bazarmada/pages/img/icons/cross.png" alt="Supprimer" style="height:10px;width:10px;" /></a></td>
    </tr>
</table>

那么如何删除&#34; hr&#34;上方和下方的空白行?元素?

1 个答案:

答案 0 :(得分:1)

默认<hr>标记显示水平线。但在你的情况下,可以有一个CSS规则覆盖默认外观。使用inspect元素并检查表中hr标记的匹配CSS规则。

我的测试Test