我正试图将margin-left:20px;
我在网页中间的项目符号列表向内微移20px。
<li>• Service level agreements to match your needs from next business day response to a two hour fix</li>
<li>• 24x7x365 service coverage</li>
<li>• Dedicated client management and UK based service des</li>
<li>• Network of fully qualified engineers and strategic stock locations</li>
我通过向中添加样式来实现此目的,该样式li
效果很好,但是我也在<li>
网站顶部的导航栏中使用了样式,因此,通过对其进行样式设置li
,也会使导航栏略微超出20像素。
我尝试<span>...</span>
在列表中使用样式,并在样式中添加样式,但这只会微调最上面一行,而不会影响其余部分。
我不想在每一个上都添加aclass
或as,因为这样会打败用一种简单的方法来微调我的列表的观点。ID
<li>
提前致谢
使用类特异性选择器可以实现此目的。
例如,
<ul class="justBullets">
<li>Service level agreements to match your needs from next business day response to a two hour fix</li>
<li>24x7x365 service coverage</li>
<li>Dedicated client management and UK based service des</li>
<li>Network of fully qualified engineers and strategic stock locations</li>
</ul>
CSS:
.justBullets li{margin-left:20px;}
希望这可以帮助。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句