我正在寻找与其术语一致的定义列表,以便
<dl>
<dt>Email</dt><dd>contact@example.com</dd>
<dt>Bio</dt><dd>Person's full-text bio, which spans multiple lines, and starts on the same line as the text <q>Bio</q>, just like the previous definitions. Any given solution should both allow this text to wrap below the <dd> and then provide a line break afterwards.</dd>
<dt>Phone</dt><dd>(555) 123-4567</dd>
</dl>
呈现为:
电子邮件: contact@example.com
Bio:人物的全文bio,跨越多行,与文本“Bio”在同一行开始,就像前面的定义一样。任何给定的解决方案都应允许此文本在 <dd> 下方换行,然后在之后提供换行符。
电话: (555) 123-4567
我已经尝试过使用dt,dd{display:inline}
,但这导致所有定义都显示在一行中。
我已经查看了 如何设置 dt 和 dd 的样式,以便它们在同一行?它导致了更多的表格布局,在这种情况下不起作用。