首页 > 解决方案 > 如何删除列表项上的箭头。我只需要 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>

在此处输入图像描述

标签: css

解决方案


替换ul#ulMeet li:beforeul#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>


推荐阅读