The source code below is
in the selected song selection (stop) of the pull-down button.
The background color is set to gradation.
"However, it is currently in a state other than ""Select (Stop)"" and pull down in that state
"
When you open the button, the background color of the song selection (stop) is not gradation, but
It is the current background color (*Select and press
It's gradation...)
How do I rewrite the
of the song selection (stop) even when the pull-down button is open?
Please let me know if the background color is gradation.
<bgsound id="bgm"src="loop="-1">
<script type="text/javascript">
<!--
function selectBgm(e){
var selectedIndex=e.selectedIndex;
bgm.src=e [selectedIndex].value;
document.getElementById("bgmSelector").style.background=e[selectedIndex].style.background;
}
// -- >
</script>
<SELECT id="bgmSelector" style="background: linear-gradient(left, gold 0%, pink 35%, lime 100%);background: -webkit-linear-gradient(left, gold 0%, pink 35%, lime 100%); background: -moz-linear-gradient(left, gold 0%, pink 35%, lime 100%); background: -o-linear-gradient(left, gold 0%, pink 35%, lime 100%); background: -ms-linear-gradient(left, gold 0%, pink 35%, lime 100%);" onchange="selectBgm(this);">
<OPTION style="background: linear-gradient(left, gold 0%, pink 35%, lime 100%);background: -webkit-linear-gradient(left, gold 0%, pink 35%, lime 100%); background: -moz-linear-gradient(left, gold 0%, pink 35%, lime 100%); background: -o-linear-gradient(left, gold 0%, pink 35%, lime 100%); background: -ms-linear-gradient(left, gold 0%, pink 35%, lime 100%);" value="" selected>選曲(停止)</OPTION>
<OPTION style="background:green;"value="classic.wav">classic</OPTION>
<OPTION style="background:deepink;"value="alarm.wav">alarm tone</OPTION>
</SELECT>
Unfortunately, there is no common way.
CSS support within the SELECT element pop-up menu varies across browser platforms.
and so on.I remember Firefox, IE, and Edge were not fully supported.
© 2024 OneMinuteCode. All rights reserved.