删除具有多个ul的特定列表样式 [英] Removing specific list-style's with multiple ul's

查看:51
本文介绍了删除具有多个ul的特定列表样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我们举个例子,我有两个列表.

Let's say as an example, I have two lists.

第一:

<ul>
<li>TEST 1</li>
<li>TEST 2</li>
<li>TEST 3</li>
<li>TEST 4</li>
<li>TEST 5</li>
<li>TEST 6</li>
<li>TEST 7</li>
</ul>

第二名:

<ul>
<li>TEST 1</li>
<li>TEST 2</li>
<li>TEST 3</li>
<li>TEST 4</li>
</ul>

我想从第一个列表中的TEST 4中删除列表样式(只是图标),并从第二个列表中从TEST 3中删除列表样式(同样只是图标).

I'd like to remove the list-style (just the icon) from TEST 4 in the first list and the list-style (again, just the icon) from TEST 3 from the second list.

我该如何实现?

推荐答案

在这里工作jsFiddle.

使用 nth-last-child(2)是一种选择,如下所示.

Using nth-last-child(2) is one option, as shown here.

li:nth-last-child(2) {
   list-style-type: none; 
}

这篇关于删除具有多个ul的特定列表样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆