display:inline;有什么用呢?
<ul id= "skip ">
<li> <a href= "#main "> Skip to main content </a> </li>
<li> <a href= "#content-secondary "> Skip to secondary content (sidebar) </a> </li>
</ul>
#skip {
margin:0 0 5px;
padding:0 1em;
list-style:none;
background:#f1efe7;
}
#skip li {
display:inline;
margin:0 1em 0 0;
padding:0;
font-size:0.94em;
line-height:2.5;
}
------解决方案--------------------
display:inline就是将元素显示为行内元素.
例如一个 <div> test </div> <div> test </div> 默认会占2行,如果设置display:inline;,就会在一行内显示