我正在尝试使用垂直对齐的文本列出列表,但无论我尝试和搜索多少次,我都无法做到。那么,如何使用 twitter bootstrap 实现以下结果?!
Ahmed: what's your name?
Bob: ahmed
Cate: ok!
目前我有这个,我似乎无法修复。
Ahmed: what's your name?
Bob: ahmed
Cate: ok!
HTML:
<div class="container-fluid" align="center">
<div class="jumbotron">
<ul style="list-style-type: none; vertical-align: middle;">
<li><h5><strong>Ahmed and his friends</h5></li>
<li><h5><strong>life is good</h5></li>
</ul>
</div>
</div>
最佳答案
你需要的是让你的 ul 标签在你的页面中间居中并且 li 左对齐
在 css 中,您可以尝试将元素右对齐:
ul {
margin-left:35%;
}
li {
text-align:left;
}
关于html - 如何制作垂直对齐文本的列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37241541/