gpt4 book ai didi

html - 如何使用数字和字母顺序制作嵌套列表

转载 作者:搜寻专家 更新时间:2023-10-31 23:26:16 25 4
gpt4 key购买 nike

我正在尝试让嵌套列表从数字变为字母顺序。可以看到JsFiddle我有类 alpha 我想将 3.1.1 更改为 a. 有什么想法吗?

strong {
font-weight: 700;
}

.maincontent ol {
margin: 25px;
}

ol.tc li ol.d {
list-style-type: lower-alpha !important;
color: red;}

ol.tc {
counter-reset: item;
}

ol.tc li {
display: block;
position: relative;
}
ol.tc li:before {
content: counters(item, ".")".";
counter-increment: item;
position: absolute;
margin-right: 100%;
right: 10px; /* space between number and text */
}

ol.tc {
counter-reset: item;
}
ol.tc li:before {
content: counters(item, ".")".";
counter-increment: item;
position: absolute;
margin-right: 100%;
right: 10px; /* space between number and text */
}

ol.alpha {
counter-reset: item;
list-style-type: lower-alpha;
}

ol.alpha li:before {
list-style-type: lower-alpha;
position: absolute;
margin-right: 100%;
right: 10px; /* space between number and text */
color: pink;
}
<ol class="tc">
<ul>
<li><strong>Preconditions</strong><br>
<ol class="tc">
<li>Before we can provide you with Pay Monthly Services, you will need to:</li>
<li>Complete our application process and provide us with any information which we reasonably ask for.</li>
<li>Have a credit score and provide us with inancial security which is satisfactory to us. </li>
<li>Provide us with valid proof of identity and evidence that you are permanently living in the Republic of Ireland.
<li>Provide us with valid proof that you are aged over 18 years. </li>
</ol>
</li>

<li><strong>Tariff Limits</strong><br>
<ol class="tc">
<li>Tariffs may include a limit on the volume of Services, including minutes, texts and/or internet access, which can be used without extra charge. Charges for all Services in excess of any Tariff limits will be charged at the rates set out in the charges.</li>
</ol>
</li>




<li><strong>Call Charges covered by Tariff limits</strong><br>
<ol class="tc">
<li>Tariff limits cover calls made in Ireland to:
<ol>

<ol class="alpha">
<li>standard Irish landlines; and</li>
<li>08 numbers allocated to Irish mobile network operators.</li>
</ol>
</li>



</ul>
</ol>

最佳答案

html 标记无效

<ol class="tc">
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
</ol>

看下面的答案

strong {
font-weight: 700;
}

.maincontent ol {
margin: 25px;
}

ol.tc li ol.d {
list-style-type: lower-alpha !important;
color: red;}

ol.tc {
counter-reset: item;
}

ol.tc li {
display: block;
position: relative;
}
ol.tc li:before {
content: counters(item, ".")".";
counter-increment: item;
position: absolute;
margin-right: 100%;
right: 10px; /* space between number and text */
}

ol.tc {
counter-reset: item;
}
ol.tc li:before {
content: counters(item, ".")".";
counter-increment: item;
position: absolute;
margin-right: 100%;
right: 10px; /* space between number and text */
}

ol.alpha {
counter-reset: item;
}

ol.alpha li:before {
content: counter(item, lower-alpha) ". ";
counter-increment: item;
position: absolute;
margin-right: 100%;
right: 10px;
color: pink;

}
<ol class="tc">
<li><strong>Preconditions</strong>
<br/>
<ol class="tc">
<li>Before we can provide you with Pay Monthly Services, you will need to:</li>
<li>Complete our application process and provide us with any information which we reasonably ask for.</li>
<li>Have a credit score and provide us with inancial security which is satisfactory to us.</li>
<li>Provide us with valid proof of identity and evidence that you are permanently living in the Republic of Ireland.</li>
<li>Provide us with valid proof that you are aged over 18 years.</li>
</ol>
</li>
<li><strong>Tariff Limits</strong>
<br/>
<ol class="tc">
<li>Tariffs may include a limit on the volume of Services, including minutes, texts and/or internet access, which can be used without extra charge. Charges for all Services in excess of any Tariff limits will be charged at the rates set out in the charges.</li>
</ol>
</li>
<li><strong>Call Charges covered by Tariff limits</strong>
<br/>
<ol class="tc">
<li>Tariff limits cover calls made in Ireland to:
<ol class="alpha">
<li>standard Irish landlines; and</li>
<li>08 numbers allocated to Irish mobile network operators.</li>
</ol>
</li>
</ol>

关于html - 如何使用数字和字母顺序制作嵌套列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30695888/

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