如何使用html css强制列表是垂直的 [英] How to force a list to be vertical using html css
本文介绍了如何使用html css强制列表是垂直的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个列表,我想添加到< div>
。每个listitem包含一个< div>
,它又包含一个图像和一个文本字符串。列表必须是垂直的。我尝试为< ul>
和 width:100%尝试
但是列表是从左到右水平。如何使列表垂直? display:block
I have a list i want to add to a <div>
. Each listitem contains a <div>
which in turn contain an image and a text string. The list must be vertical. I ve tried putting display:block
for the <ul>
with width:100%
but the list is flowing left to right horizontally. How do I make the list vertical?
推荐答案
尝试将 display:block
在< li>
标记中,而不是< ul>
Try putting display: block
in the <li>
tags instead of the <ul>
这篇关于如何使用html css强制列表是垂直的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文