我想根据图片的z-index更改标记<audio>
的网址,例如:
如果img z-index = 7 <audio src = img.mp3> </audio>
图像位于旋转木马中,顶部图像始终位于z-index = 7
<div class="wrapper">
<div id="coverflow" style="left: -391.19999999999993px;">
<img src="img/rf_fip.png" style="z-index: 7; -webkit-transform: matrix(1, -0.2, 0, 1, 0, 0) scale(0.25); left: -284.7px;">
<img src="img/rf_culture.png" style="z-index: 8; -webkit-transform: matrix(1, -0.2, 0, 1, 0, 0) scale(0.25); left: -379.59999999999997px;">
<img src="img/rf_info.png" style="z-index: 9; -webkit-transform: matrix(1, -0.2, 0, 1, 0, 0) scale(0.25); left: -474.49999999999994px;">
<img src="img/rf_inter.png" style="z-index: 10; -webkit-transform: matrix(1, -0.2, 0, 1, 0, 0) scale(0.25); left: -569.4px;">
<img src="img/rf_bleu.png" style="z-index: 11; -webkit-transform: matrix(1, -0.2, 0, 1, 0, 0) scale(0.25); left: -664.3px;">
<img src="img/rf_musique.png" style="z-index: 12; -webkit-transform: matrix(1, 0, 0, 1, 0, 0) scale(0.25); left: -664.3px;">
<img src="img/rf_mouv.png" style="z-index: 11; -webkit-transform: matrix(1, 0.2, 0, 1, 0, 0) scale(0.25); left: -664.3px;">
</div>
</div>
我不知道是否可以使用JS或者是否需要Jquery。