html - 并排显示 dt 标签,而不是一个在另一个下方

标签 html css

我想并排显示 HTML 标记的 dt 而不是一个在另一个下面 例如:--

<dl class='Desktop'>
  <dt class='first'>first</dt>
  <dt class='Second'>second</dt>
  <dt class='third'>third</dt>
</dl>

输出:第一个 第二个 第三个

最佳答案

我喜欢所有其他答案,因为它们都很好,但我认为我的答案简单得多,不需要 IE hack:

dt {
    display: inline;
}

关于html - 并排显示 dt 标签,而不是一个在另一个下方,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5105304/

相关文章:

html - 停止在超棒的字体图标周围环绕文字

html - 网格元素应该跨行流动,而不是列

javascript - 重新加载 div javascript 只需要 ajax 吗?

html - 修复 float 和 div 对齐

html - CSS child/nth child/typeof 选择器

html - 将 slider 列为背景色并锚定在其上

css - 如何缓存js、css和图片

php - mysql_fetch_array 问题

html - 使用 css/sass 的 x 轴倾斜文本

javascript - 单击按钮时将搜索框放在搜索按钮的左侧