css - 为什么 <ul> 显示 :inline does not bring list items with the document flow as <ul> with display:inline-block does

标签 css user-interface inline display

下图是我的代码的屏幕截图,其中包含 <ul> display:inline我没有改变<li>默认情况下是 block 显示。

enter image description here

最佳答案

带有display:inline-block 的元素类似于display:inline 元素display:inline-block 可以有宽度高度,而display:inline 没有。这意味着您可以将内联 block 元素用作 block ,同时在文本或其他元素中流动它。

关于css - 为什么 <ul> 显示 :inline does not bring list items with the document flow as <ul> with display:inline-block does,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44792150/

相关文章:

jquery 检查元素显示状态然后隐藏它

jquery - 无法在 HTML/CSS 中设置事件按钮

javascript - 导航 jQuery

user-interface - 删除默认的不存在的页脚链接

kotlin - 在Kotlin中直接调用内联乐趣-而不是内联它

css - 悬停后如何使未知宽度的内联 block 元素保持在中心位置

html - 移动设备的 Bootstrap 顶部菜单不起作用

python - 在一个窗口中执行具有多个屏幕的项目的最佳 Python GUI 模块是什么?

c# - 跨线程操作无效

html - 将 <span> 元素放在同一行文本中