gpt4 book ai didi

html - 使用 CSS 格式化列表

转载 作者:太空宇宙 更新时间:2023-11-04 02:00:11 24 4
gpt4 key购买 nike

我在尝试为两个 <ul> 设置不同样式的行距时遇到了一些问题我有的 list 。

如何使它们独一无二?我如何编写 CSS 代码来告诉其中之一添加行间距?

我在 w3schools 网站上,但我觉得我在使用这个网站时有点迷茫:

<style type=text/css">
ul li {padding:6px;}

这是对两个列表应用填充,我如何区分这两个列表>

ul 列表示例 1:

<ul class="a">
<li><b>Asset Question</b> - a question requested for a specific job code and posting</li>
<li><b>Common Asset Questions</b> - a question likely to used by mnay agencies, such as proficiency in Excel or Word, HR/CMS or MMARS (i.e., the existing question ACOMMON-01 - How proficient are you in Microsoft Outlook?)</li>
<li><b>Special Requirement Question</b> - typically a question about a license or certification required for the job title in general or for a specific position for that title (i.e., the existing question "SREQ-31" - Do you possess a current and valid Massachusetts Class A Motor Vehicle Operator's License?).</li>
</ul>

ul 列表示例 2:

<ul class="b">
<li><b>Less than 1 year of experience</b></li>
<li><b>At least 1 year but less than 3 years of experience</b></li>
<li><b>At least 3 years but less than 5 years of experience</b></li>
<li><b>At least 5 years but less than 7 years of experience</b></li>
<li><b>At least 7 years but less than 10 years of experience</b></li>
<li><b>At least 10 years of experience</b></li>
<li><b>None of the above</b></li>
</ul>

最佳答案

.a li {
padding:16px;
}
.b li {
padding:6px;
}

关于html - 使用 CSS 格式化列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41902170/

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