用HTML写一个关于音乐播放的网页
时间: 2023-09-25 08:11:11 浏览: 61
好的,以下是一个简单的关于音乐播放的网页的HTML代码:
```html
<!DOCTYPE html>
<html>
<head>
<title>音乐播放器</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<style>
body {
background-color: #f2f2f2;
font-family: Arial, sans-serif;
padding-top: 60px;
padding-bottom: 50px;
}
h1, h2, h3 {
font-weight: bold;
text-align: center;
}
.container {
background-color: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0px 0px 10px #888888;
}
#audio-player {
width: 100%;
margin-bottom: 20px;
}
</style>
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">音乐播放器</a>
</div>
</div>
</nav>
<div class="container">
<h1>歌曲名称</h1>
<div class="row">
<div class="col-sm-6">
<img src="https://via.placeholder.com/300x300" alt="歌曲封面">
</div>
<div class="col-sm-6">
<h2>歌手名称</h2>
<p>专辑名称</p>
<p>发行时间:2021年1月1日</p>
<p>流派:摇滚</p>
<p>语言:英语</p>
</div>
</div>
<hr>
<audio id="audio-player" controls>
<source src="https://www.w3schools.com/tags/horse.ogg" type="audio/ogg">
<source src="https://www.w3schools.com/tags/horse.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<h3>歌词</h3>
<pre>
[Verse 1]
Just a small town girl
Livin' in a lonely world
She took the midnight train goin' anywhere
Just a city boy
Born and raised in South Detroit
He took the midnight train goin' anywhere
[Chorus]
Don't stop believin'
Hold on to that feelin'
Streetlights, people
Don't stop believin'
Hold on
Streetlights, people
</pre>
<hr>
<h3>评论</h3>
<form>
<div class="form-group">
<label for="comment">发表评论:</label>
<textarea class="form-control" rows="5" id="comment"></textarea>
</div>
<button type="submit" class="btn btn-primary">提交评论</button>
</form>
</div>
</body>
</html>
```
这个网页包括了一个音乐播放器、歌曲信息、歌词和评论等内容。具体效果可以在浏览器中查看。需要注意的是,这里只是一个基础的HTML代码,还需要使用CSS和JavaScript来美化界面和实现功能。
相关推荐
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)