Today bored Write This example, hope to be helpful to beginners, the code is as follows
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
<!
DOCTYPE
html>
<
html
>
<
head
>
<
meta
charset="utf-8">
<
title
></
title
>
<
link
rel="stylesheet" href="Font-Awesome-3.2.1/css/font-awesome.min.css">
<!--如果是IE7将自动加载这一句-->
<!--[if IE 7]>
<link rel="stylesheet" href="Font-Awesome-3.2.1/css/font-awesome-ie7.min.css">
<![endif]-->
<
style
type="text/css">
body, div, ul, li {
padding: 0px;
margin: 0px;
font-size: 15px;
}
.first {
list-style: none;
list-style-image: url("star.gif");
padding-left: 20px;
}
.second li{
list-style: none;
background: url("star.gif") no-repeat;
padding-left: 20px;
}
.third {
list-style: none;
}
</
style
>
</
head
>
<
body
>
<
h2
>第一种:list-style-image(图片)</
h2
>
<
ul
class="first">
<
li
>阿斯大法</
li
>
<
li
>阿斯大法</
li
>
<
li
>阿斯大法</
li
>
</
ul
>
<
h2
>第二种:backgroud(图片)</
h2
>
<
ul
class="second">
<
li
>阿斯大法</
li
>
<
li
>阿斯大法</
li
>
<
li
>阿斯大法</
li
>
</
ul
>
<
h2
>第三种:Font-Awesome-3.2.1(字体库)</
h2
>
<
ul
class="third">
<
li
><
i
class="icon-star"></
i
>阿斯大法</
li
>
<
li
><
i class="icon-star"></
i
>阿斯大法</
li
>
<
li
><
i
class="icon-star"></
i
>阿斯大法</
li
>
</
ul
>
</
body
>
</
html
>
|
I wrote the deme:http://download.csdn.net/detail/u010095549/9320861
Effect
Welcome to join, Java, the front end of the common learning "love asked shared programming tribe" 479668591
HTML Li tags Three ways to add icons before