日期:2014-05-17 浏览次数:20689 次
<body> 正文文本 <ul> <li> <a>UL列表</a> <div id="div_4"> <a href='javascript:'>新建</a> </div> </li> </ul> </body>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>MAXX</title> <style type="text/css"> *{margin:0;padding:0;} .set_bor ul { list-style-type:none; float: left; .set_bor ul li { margin: 0; padding: 0; list-style: none; } .set_bor li a { display: block; margin: 0 1px 0 0; padding: 4px 10px; width: 60px; height: 20px; color: #FFF; text-align: center; text-decoration: none; } .set_bor ul li a:hover { cursor: pointer; } .set_bor ul div { position: absolute; visibility: hidden; margin: 0; padding: 0; background: #EAEBD8; } .set_bor ul div a { position: relative; display: block; margin: 0; width: auto; white-space: nowrap; text-align: left; text-decoration: none; background: #C5E1F4; color: #2D2D2D; } .set_bor ul div a:hover { background: #49A3FF; color: #FFF; } </style> </head> <body> <div style="float:left;">正文文本</div> <div class="set_bor"> <ul> <li> <a>UL列表</a> <div id="div_4" style="display:inline;"> <a href='javascript:'>新建</a> </div> </li> </ul> </div> </body> </html>
------解决方案--------------------
<body>
<div style="float:left;">
正文文本
</div>
<ul>
<li>
<a>UL列表</a>
<div id="div_4">
<a href='javascript:'>新建</a>
</div>
</li>
</ul>
</body>