- objective-c - iOS 5 : Can you override UIAppearance customisations in specific classes?
- iphone - 如何将 CGFontRef 转换为 UIFont?
- ios - 以编程方式关闭标记的信息窗口 google maps iOS
- ios - Xcode 5 - 尝试验证存档时出现 "No application records were found"
我希望 HTML 可以做一些语义上等同于此的事情;
<dl class="main-list">
<definitionitem>
<dt>Some Thing</dt>
<dd>You know it!</dd>
<dt>Another Thing</dt>
<dd>Word.</dd>
</definitionitem>
<definitionitem>
<dt>Stuff</dt>
<dd>Alright!</dd>
</definitionitem>
</dl>
但是,由于我最接近的是我对语义不是 100% 满意的东西;
<div class="redundant-wrapper">
<dl class="main-list">
<dt>Some Thing</dt>
<dd>You know it!</dd>
<dt>Another Thing</dt>
<dd>Word.</dd>
</dl>
<dl class="another-main-list">
<dt>Stuff!</dt>
<dd>Alright!</dd>
</dl>
</div>
我想知道是否有人对如何执行此操作有任何其他想法?
另外,项目被分组的原因是因为它们在被标记的内容中以视觉方式分组。想象一个字典页面,只有一个定义列表,其中每个定义都在一个向左浮动的插入框中。我经常遇到这种情况。
最佳答案
不,Ian Hickson(HTML 规范编辑)是 convinced这是一个 CSS 问题,而不是 HTML 问题:
This shouldn't be necessary. It's a limitation of CSS.
The right solution is for CSS to provide some pseudo-element or othermechanism that introduces an anonymous container into the renderingtree that wraps the elements you want to wrap.
同时,fantasai(CSS规范编辑)对contrary深信不疑| :
I don't think this is a CSS problem. I think it's an HTML problem.Pseudo-elements are a non-trivial thing to spec, and a non-trivialthing to implement, and a comparatively confusing thing to use.
然而,Ian 显然忽略了这一点并继续脱离现实。
LEGEND
也有同样的问题(根据 HTML 规范,它必须是 FIELDSET
的第一个直接子级),FIGCAPTION
(必须是 FIGURE
的第一个/最后一个直接子代)和 LI
(UL
/OL
的直接子代).
特别是DT
/DD
,我个人use UL
列表,每个 LI
中都有 DL
:
<ul>
<li><dl>
<dt>Lorem</dt>
<dd>Lorem definition</dd>
</dl></li>
<li><dl>
<dt>Ipsum</dt>
<dd>Ipsum definition</dd>
</dl></li>
</ul>
所以我们有 DL
来建立 DT
和 DD
之间的关系,以及 UL
列表来使它们全部属于一个列表。
更新 (2016-11-14):HTML 标准(目前为 WHATWG version)(自 2016-10-31 起)allows DIV
元素(可选地与所谓的脚本支持元素 SCRIPT
、TEMPLATE
混合)成为 DL
元素。 W3C 的 HTML validator 还没有考虑这个变化,但是实验性的HTML5.org validator
更新(2017 年 1 月 18 日): 事实证明规范确实 not
DT
/DD
允许多个嵌套的 DIV
包装器,因此该功能在实践中的用处实际上非常有限,UL
→LI
→DL
此处描述的方法仍然适用。
关于html - 有没有一种有效的方法可以用 HTML 元素包装 dt 和 dd?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10875064/
我有一个类为.dt-horizonal 的描述列表,其中我确保dt 内容不会被以下this 截断|发布并增加宽度。它工作正常,但是当有一个空的 dt 时它不起作用,因此下一个 dd(Canada)
当我运行以下代码时,我只得到 1 或 2 行数据。如何增加显示的行数?谢谢! --- title: " File Analysis" output: html_docu
我使用标签 DL-DT-DD 在网站上列出商店信息。该信息将由服务器生成并放置。 Shop Name US Master Autos Toll Free Not Available Fax (30
更新 我正在尝试使用 shiny 和 DT 制作应用,similar to the accepted answer from Shree here .你,我想添加以下内容: 扩展 Shree 的解决方
我有这个标记: Lot Size 324 sq. meters Baths 2 Full Description
有没有可能得到这个样子 来自这段代码(使用 CSS?) Latitude 50.0 Longitude 100.0 h (metres) 0.000 Vφ (mm/y) -6.4 Vλ (mm/y)
我正在做一些计算和行操作,并意识到对于某些任务,例如数学运算,它们都有效,例如 d['c3'] = d.c1 / d. c2 d['c3'] = d['c1'] / d['c2'] 我想知道是否在某些
我可以使用从任意模块转储类型 dt modulename!type 在某些情况下,我看到例如 dt nt!_TEB (并且它有效)尽管该模块名为 ntdll: 0:001> lm m nt start
我正在尝试制作一个交互式表格,总结在多项研究中测试的结果的最高结果,我还希望用户通过子行访问更详细的结果。主表中仅显示具有最小 p 值的“顶级”模型。 现在我将相关结果分为两个数据框:1. 仅顶部结果
Shiny 似乎改变了数据表的实现。这是什么原因? 除非我遗漏了什么,否则新的默认值看起来像是倒退了一步。一方面,他们缺少表格底部的特定于列的搜索框。有没有办法替换该功能? 最佳答案 它当然仍然存在,
所以我有一个类似这样的 dl 列表: .title { display: inline-block; padding-bottom: 20px; } dd { -moz-margin-st
我正在使用 PostgreSQL 8.4.20 版。由于工作问题和上面运行的现有数据库,我无法升级它。 我创建了一个如下所示的模式: -- -- Name: Bug Tracking; Type: C
我正在寻找类似 hive 的东西 Select * from table 1 where dt > (Select max(dt) from table2) 显然,hive 不支持 where 子句中
我的数据存储方式的示例 df: df = pd.DataFrame({'DOB': {0: '2003-01-01 00:00:00+00', 1: '2003-01-02 00:00:00+00'}
我想列出一个定义列表与 一列中的元素及其对应的 另一个元素。 棘手的部分是我想要我的 s 永远不会换行,如果它们对于第一列来说太宽,我想要 元素向下移动以腾出空间: 这是我的目标的屏幕截图: 这是
在我开始这个问题之前,我使用 P0、P1、P2 和 P3 作为四个立方贝塞尔曲线点,并且使用“t”因为它是参数化的。另外,我在这个网站和谷歌上搜索过类似的问题,但没有找到。如果这是一个常见问题,我深表
我正在尝试将两个常用共享的 JS 回调组合到一个 R 数据表 Shiny 应用程序(具有单选按钮(参见 https://yihui.shinyapps.io/DT-radio/ 和 Extractin
我正在尝试垂直滚动,但这不起作用,有人可以解释原因吗?我还想默认一次显示 20 行。 谢谢 title: "Untitled" output: flexdashboard::flex_dashbo
是否可以在 Rstudio DT 数据表中在标题参数中添加超链接?我已经尝试了很多次,但我似乎无法让任何事情发挥作用。我尝试了 w3schools fiddle 的 html 标题,我可以获得一个在表
是否可以在 Rstudio DT 数据表中在标题参数中添加超链接?我已经尝试了很多次,但我似乎无法让任何事情发挥作用。我尝试了 w3schools fiddle 的 html 标题,我可以获得一个在表
我是一名优秀的程序员,十分优秀!