gpt4 book ai didi

css - 李 :active doesn't work in my code

转载 作者:行者123 更新时间:2023-11-28 09:21:58 27 4
gpt4 key购买 nike

当链接处于事件状态时,我无法让背景颜色和字体发生变化(li:active 不起作用)请帮帮我。

点击链接: http://jsfiddle.net/rbL7ncf2/2/

<div id="wrapper">
<div id="menu">
<ul>
<li style="background-color:#5b90bf; color:#fff; font-weight:bold;">Produtos</li>
<li><span class="button" data-type="pdt1">Teste 1</span></li>
<li><span class="button" data-type="pdt2">Teste 2</span></li>
<li><span class="button" data-type="pdt3">Teste 3</span></li>
<li><span class="button" data-type="pdt4">Teste 4</span></li>
<li><span class="button" data-type="pdt5">Teste 5</span></li>
<li><span class="button" data-type="pdt6">Teste 6</span></li>
<li><span class="button" data-type="pdt7">Teste 7</span></li>
<li><span class="button" data-type="pdt8">Teste 8</span></li>
<li><span class="button" data-type="pdt9">Teste 9</span></li>
<li><span class="button" data-type="pdt10">Teste 10</span></li>
</ul>
</div>

<div class="boxes">
<div class="box" id="pdt1">classe 1</div>
<div class="box" id="pdt2">classe 2</div>
<div class="box" id="pdt3">classe 3</div>
<div class="box" id="pdt4">classe 1</div>
<div class="box" id="pdt5">classe 5</div>
<div class="box" id="pdt6">classe 6</div>
<div class="box" id="pdt7">classe 7</div>
<div class="box" id="pdt8">classe 8</div>
<div class="box" id="pdt9">classe 9</div>
<div class="box" id="pdt10">classe 10</div>
</div>

最佳答案

某些浏览器不支持 :active 选择器,除了链接元素 (a),如 IE7

请详细说明您认为哪个浏览器不工作?

谢谢

也正如其他用户所提到的,您缺少 :active css!

关于css - 李 :active doesn't work in my code,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26047050/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com