我想使用 aria-expanded="true"
来更改 CSS 属性,例如活动类:
<li class="active">
<a href="#3a" class="btn btn-default btn-lg" data-toggle="tab" aria-expanded="true">
<span class="network-name">Google+</span>
</a>
</li>
我想要 <a>
到 background-color: #42DCA3
但只有在 aria-expanded="true"
时。
原文由 fraser dale 发布,翻译遵循 CC BY-SA 4.0 许可协议
当你可以只使用 css 时为什么要使用 javascript?