当文本变得有点长时,我的黄色格跳下来。 See imagesofproblem。< Div>跳到新行
<html>
<div style="background-color:#00ff00; width:200px;">
<ul style="list-style:none;">
<li><span style="margin-right:5px;">></span><div style="display:inline-block; background-color:yellow;">Hit me! Hit me! -Hit me! -</div> </li>
</ul>
</div>
</html>
我怎样才能确保黄色div不会跳下来,当文字变长。日志文本应该会自动变成新行。
(是否有可能不把“宽度”黄色DIV解决这个问题)
你可以设置你的宽度为'auto'或者只是删除它,你不想那样? – Roljhon