HTML中多页面实现背景音乐的连续播放css
时间: 2023-05-29 08:04:54 浏览: 158
WordPress ++++html5音频播放器
html {
background-image: url('background.jpg');
background-repeat: no-repeat;
background-size: cover;
background-attachment: fixed;
}
#audio {
visibility: hidden;
position: absolute;
top: 0;
left: 0;
}
<audio id="audio" loop>
<source src="music.mp3" type="audio/mpeg">
</audio>
<script>
var audio = document.getElementById('audio');
audio.play();
</script>
阅读全文