我在果园中创建了列表,并且h1标签采用列表的标题。我需要为标题添加一个项目符号。在果园的标题标签中添加子弹
我需要子弹像下面的图片h1标签之前
<header>
<h1>School info</h1>
</header>
我使用的背景:图像属性,但它不显示子弹。我怎样才能得到子弹?
我在果园中创建了列表,并且h1标签采用列表的标题。我需要为标题添加一个项目符号。在果园的标题标签中添加子弹
我需要子弹像下面的图片h1标签之前
<header>
<h1>School info</h1>
</header>
我使用的背景:图像属性,但它不显示子弹。我怎样才能得到子弹?
尝试:
h1:before {
background-image: url(http://www.alexander-bown.com/wp-content/uploads/2011/05/big-black-dot.jpg);
background-repeat: no-repeat;
background-size: 20px;
width: 20px;
height: 20px;
display: inline-block;
content:"";
vertical-align: middle;
}
HTML
<header>
<ul>
<li><h1> School Info </h1> </li>
</ul>
</header>
CSS
li
{
list-style-type:square;
font-size:small;
}
h1
{
color: #3E5DA3;
font-size: 12px;
padding-bottom: 10px;
font-weight: bold;
}
<header>
<h1>
<ul>
<li> School info </li>
</ul>
</h1>
</header>
输出将被
http://fiddle.jshell.net/4wLZ6/5/检查这个小提琴 –