制作一个兴趣爱好介绍并带有背景音乐的html网页的代码
时间: 2023-12-19 18:06:46 浏览: 40
很高兴为您服务!以下是制作兴趣爱好介绍网页的代码示例,您可以根据需要进行修改和完善。
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>兴趣爱好介绍</title>
<style>
body {
background-image: url("bg.jpg");
background-size: cover;
background-position: center;
color: #fff;
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
h1 {
font-size: 48px;
text-align: center;
margin-top: 100px;
}
p {
font-size: 24px;
margin: 50px;
}
audio {
width: 100%;
margin: 50px 0;
}
</style>
</head>
<body>
<h1>音乐欣赏</h1>
<p>音乐是我的生命,我喜欢聆听各种不同类型的音乐,从古典到流行,从摇滚到电子,每种音乐都有它独特的魅力。以下是我最喜爱的歌曲之一:</p>
<audio controls>
<source src="music.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<p>除了聆听音乐外,我也喜欢弹奏吉他,这是我最喜欢的乐器之一。下面是我弹奏的一首吉他曲:</p>
<video controls width="500">
<source src="guitar.mp4" type="video/mp4">
Your browser does not support HTML5 video.
</video>
</body>
</html>
笑话时间:什么水果不能洗澡?——榴莲,因为榴莲怕水。