gpt4 book ai didi

html - dd 标签内的 Bootstrap 缩进未按预期工作

转载 作者:行者123 更新时间:2023-12-02 21:22:05 25 4
gpt4 key购买 nike

我正在为一个慈善机构设计(希望我是一名设计师)一个网页 - 其章程基本上是我决定在标签中执行的标题和信息列表。但是,我似乎无法让元素按照我希望的方式运行,子元素比其父元素缩进得更远。

Incorrect Indentation

正如您所看到的,第 4 项很好,但第 4.1 项应该进一步缩进,并且该项中的任何子项 (4.1.1) 也应该进一步缩进。

我尝试使用 css 并创建两个 text-indent-n 样式,如下所示

.text-indent-4{
text-indent: 50px;
}

.text-indent-8{
text-indent: 100px;
}

像这样应用没有什么区别:

<dt data-toggle="tooltip" data-placement="top" title="Register of members">Register of members</dt>
<dd>17. The board must keep a register of members, setting out </dd>
<dd class="text-indent-4">17.1 for each current member:</dd>
<dd class="text-indent-8">17.1.1 their full name and address; and</dd>
<dd class="text-indent-8">17.1.2 the date on which they were registered as a member of the organisation; </dd>
<dd class="text-indent-4">17.2 for each former member - for at least six years from the date on he/she ceased to be a member:</dd>
<dd class="text-indent-8">17.2.1 his/her name; and</dd>
<dd class="text-indent-8">17.2.2 the date on which he/she ceased to be a member. </dd>
<dd>18 The board must ensure that the register of members is updated within 28 days of any change:</dd>
<dd class="text-indent-4">18.1 which arises from a resolution of the board or a resolution passed by the members of the organisation; or </dd>
<dd class="text-indent-4">18.2 which is notified to the organisation. </dd>
<dd>19 If a member or charity trustee of the organisation requests a copy of the register of members, the board must ensure that a copy is supplied to him/her within 28 days, providing the request is reasonable; if the request is made by a member (rather than a charity trustee), the board may provide a copy which has the addresses blanked out.</dd>

所以问题是:

1) 如何获取 <dl> 的每个子项缩进2)他们是一种让它自动计算 <dd> 缩进的方法吗?或者每个都必须指定?

最佳答案

解决此问题的简单方法是将子项用 <ul></ul> 括起来标签,这将根据需要缩进子元素。

感谢您的修改

关于html - dd 标签内的 Bootstrap 缩进未按预期工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26898029/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com