文字装饰都没有用

时间:2016-09-19 19:41:19

标签: html css

我正在尝试将文本修饰:none用于锚标记下列出的跨度。当其他样式工作时,这种特殊的风格不起作用。我错过了什么吗?



a * {
  color: grey;
  font-weight: bold;
  font-size: 2em;
  text-decoration: none !important;
}

<ul>
  <li>Lorem ipsum dolorsit amet, consectetur adipiscing elit.</li>
  <li><a href="">Lorem <span>ipsum</span> dolor sit amet, <dolphia>consectetur</dolphia> adipiscing elit.</a>
  </li>
  <li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
  <li><a href=""><span>Lorem ipsum</span> dolor sit amet, <span>consectetur</span> adipiscing elit.</a>
  </li>
  <li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
  <li><a href=""><span>Lorem ipsum dolor sit amet</span>, consectetur adipiscing

 elit.</a>
  </li>
</ul>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:2)

a *{
  text-decoration: none;
  display: inline-block;
}
<a href="">Hello<span>world!</span></a>