css - 如何删除列表项上的箭头。我只需要 2017 年的箭头
问题描述
如何删除列表项上的箭头。我只需要 2017 年的箭头。对于列表项,我需要实心正方形。我使用了嵌套无序列表,但只有顶部 UL 我需要箭头而不是第二个 UL
@import url("//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css");
ul#ulMeet li:before {
content: "\e080";
/*content: "\009B";*/
font-family: 'Glyphicons Halflings';
font-size: 10px;
/*font-weight:bold;*/
float: left;
margin-top: 2px;
margin-left: -14px;
color: #999999;
}
<ul id="ulMeet" style="list-style:none">
<li>
<h4><a id="lnk" href="#" style="text-align:left;" onclick="YearsToggle(event, 'div2017')">2017</a></h4>
<div id="2017" style="display:none;">
<center><strong>2017</strong></center><br />
<ul>
<li>Test1</li>
<li>Test2</li>
</ul>
</div>
</ul>
解决方案
替换ul#ulMeet li:before
为ul#ulMeet > li:before
这样做,针对的直接li
子级ul#ulMeet
@import url("//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css");
ul#ulMeet> li:before {
content: "\e080";
/*content: "\009B";*/
font-family: 'Glyphicons Halflings';
font-size: 10px;
/*font-weight:bold;*/
float: left;
margin-top: 2px;
margin-left: -14px;
color: #999999;
}
<ul id="ulMeet" style="list-style:none">
<li>
<h4><a id="lnk" href="#" style="text-align:left;" onclick="YearsToggle(event, 'div2017')">2017</a></h4>
<div id="2017">
<center><strong>2017</strong></center><br />
<ul>
<li>Test1</li>
<li>Test2</li>
</ul>
</div>
</ul>
推荐阅读
- bert-language-model - 微调bert模型时嵌入文章标题和文本
- r - 从 R markdown 生成 HTML 文档时,LaTeX 不会在使用 ggplotly 创建的绘图中呈现
- .net - 邮递员响应中未显示数据注释错误消息
- cpu - 缺页导致高 KVM CPU
- python - Python海龟bgpic在python中瞬间消失
- django - 循环导入 Django,我迷路了...... :(
- pandas - 熊猫中连续非空值的平均值
- javascript - p5.js 无法识别其他文件中的代码
- excel - 如果没有结果,VBA 数据透视表添加文本
- mysql - 如何在tableau的不同数据源中使用具有相同列名的过滤器