我有一堆翻转,当你翻转它们时,它们会在子弹上方显示数字。我希望数字在 onmouseout 上消失,但在下一次 onmousedown 之前一直保持在 onmousedown 上。有没有比给每个号码自己的 id 并打开和关闭它更简单的方法?我希望这是有道理的?!?12
谢谢!
CSS
#numbers1, #numbers2, #numbers3, #numbers4 {
font-family: Arial, Helvetica, sans-serif;
font-size: 9px;
color: #6e6965;
margin: -10px 0 0 2px;
position: absolute;
display:none;
}
HTML
<span onmouseover="document.rollimg.src=image1.src; document.getElementById('numbers1').style.display = 'inline';">
<a class="bullet"><div id="numbers1">1</div></a></span>
<span onmouseover="document.rollimg.src=image2.src; document.getElementById('numbers2').style.display = 'inline';"
<a class="bullet"><div id="numbers2">2</div></a></span>
<span onmouseover="document.rollimg.src=image3.src; document.getElementById('numbers3').style.display = 'inline';"
<a class="bullet"><div id="numbers3">3</div></a></span>
<span onmouseover="document.rollimg.src=image4.src; document.getElementById('numbers4').style.display = 'inline';"
<a class="bullet"><div id="numbers4">4</div></a></span>