Html 如何从无序列表中删除缩进,但不使用CSS?
代码如下——我想在几个地方进行更改,但不是全面更改Html 如何从无序列表中删除缩进,但不使用CSS?,html,Html,代码如下——我想在几个地方进行更改,但不是全面更改 <ul> <li> <div style="margin: 0px" > 58% of the population is age 19 or younger (an estimated 520,000 children), compared with 36% of the broader population. </div> </li> &l
<ul>
<li>
<div style="margin: 0px" >
58% of the population is age 19 or younger (an estimated 520,000 children), compared with 36% of the broader population.
</div>
</li>
<li>
<div style="margin: 0px">
3% are age 65 or older, compared with 11% of the broader population.
</div>
</li>
</ul>
-
58%的人口年龄在19岁或19岁以下(估计有52万名儿童),而在更广泛的人口中这一比例为36%。
-
3%的人年龄在65岁或65岁以上,而在更广泛的人群中这一比例为11%。
您选择的元素带有默认样式,必须用CSS覆盖。唯一的其他选择是使用不同的元素。当你说“我想在几个地方进行更改”时,你能更具体一些吗?是每三件吗?或者每第二项,但仅在前6项中?如果你能说得更具体一些,那真的会有帮助-谢谢!只需向要删除缩进的元素添加一个class
,并像一样设置css。您的_class{margin:0;padding:0}
您应该使用一个类,当您可以使用一个类来简化它时,无需复制css源代码。另外,您是否希望在li
标记上使用此样式,而不是在div
标记上使用此样式?我希望页边空白在ul
或li
标签上,而不是div
s。