看这个,子弹在照片上:
图片css:
img[src="img/tecnicos.jpg"] {
max-width: 300px;
max-height: 300px;
float: left;
margin-right: 2em;
}
项目列表css:
#contenido ul {
max-width: 75ch;
margin: auto;
font-family: 'Work Sans';
text-align: left;
line-height: 1.5em;
font-size: 0.9em;
list-style: disc;
}
HTML:
<h2>BLa</h2>
<img src="img/image.jpg" alt=''>
<ul>
<li>Line 1</li>
<li>Line 2</li>
<li>...</li>
</ul>
Li元素没有css。
在Chrome和Firefox上,子弹就显示在应该显示在文本旁边的地方。
小费?
发布于 2016-02-25 18:15:41
将overflow: hidden
添加到列表中,如果不需要列表在图像周围流动,则会修复它:https://jsfiddle.net/jameson5555/95koe4sg/2/
ul {
overflow: hidden;
}
如果确实需要包装,可以添加如下内容:https://jsfiddle.net/jameson5555/95koe4sg/3/
ul {
overflow: hidden;
display: inline;
list-style-position: inside;
}
发布于 2016-02-25 18:15:56
创建一个新的块格式上下文
ul {
overflow: hidden;
}
https://stackoverflow.com/questions/35634417
复制相似问题