Home  >  Article  >  Web Front-end  >  如何设置 <li> 的点的大小,颜色,以及和文字的距离?_html/css_WEB-ITnose

如何设置 <li> 的点的大小,颜色,以及和文字的距离?_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:36:596151browse

样式要怎么写?

<ul>	<li>a</li>	<li>b</li>	<li>b</li></ul>


回复讨论(解决方案)

距离用padding-left
颜色和大小可以用图片或者其他标签替代

默认的不知道怎么修改。

可以有替代的方式。

li{
list-style: none;/*去掉li前端的点*/
background:url(图点图片路径) no-repeat;/*把你要的圆点样式切好图作为背景*/
text-indent: 10px;/*与文字的距离,也就是文字会空多少距离显示*/
}


        
  • a

  •     
  • b

  •     
  • b



.sss li {
line-height:30px; /*li的行高,可以控制li的间距*/
font-size:15px;  /*li内文字的大小*/
padding-left:20px;  /*li内文字距离左边的距离*/
color:red;list-style: none; /*去调li的点 ,一般不用li自带的点*/
}
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn