background-position定位怎么实现的????
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>3.10新闻中心制作评测题</title>
<style type="text/css">
/*在此定义相关CSS样式*/
*{margin:0px;padding:0px;}
.topList{
font-family:"微软雅黑";
font-size:14px;
width:350px;
height:180px;
border:1px solid #ccc;
}
.topList ul{
list-style-type:none;
height:30px;
}
.topList li{
height:30px;
line-height:30px;
}
.topList em{
font-style:normal;
float:left;
background:url( http://img1.sycdn.imooc.com//53cf0fa20001d3dc00200032.jpg) no-repeat;
background-position:0px 7px;
}
/*我用下面这种方法可以实现应该实现的效果,但是用上面background-position却怎么都想不通???不知道怎么写了,求助
.topList em{
font-style:normal;
float:left;
background:url( http://img1.sycdn.imooc.com//53cf0fa20001d3dc00200032.jpg) no-repeat;
height:16px;
line-height:16px;
margin:7px 7px;
}
*/
.topList li a:link,.topList li a:visited{
text-decoration:none;
color:#000;
}
.topList li a:hover,.topList li a:active{
text-decoration:none;
color:pink;
}
</style>
</head>
<body>
<div class="topList">
<ul>
<li class="top"><em>01</em>
<p><a href="http://www.imooc.com/" >【慕客访谈用户篇】“有为屌丝”在路上</a></p>
</li>
<li class="top"><em>02</em>
<p><a href="http://www.imooc.com/">【有奖活动】给父亲的三行书信</a></p>
</li>
<li class="top"><em>03</em>
<p><a href="http://www.imooc.com/">《程序猿,请晒出你的童年》活动获奖公告</a></p>
</li>
<li><em>04</em>
<p><a href="http://www.imooc.com/">【慕课访谈】破茧成蝶——美女程序员的蜕变史</a></p>
</li>
<li><em>05</em>
<p><a href="http://www.imooc.com/">【获奖公告】追“球”巅峰,争当“预言帝”</a></p>
</li>
<li><em>06</em>
<p><a href="http://www.imooc.com/">【问卷调查】慕课网用户学习情况大调查</a></p>
</li>
</ul>
</div>
</body>
还有看见有同问的em用float属性后怎么没有覆盖p中的文字呢