编写一个网易云app首页的前端代码
时间: 2023-08-27 09:05:52 浏览: 47
下面是一个简单的网易云音乐App首页的前端代码示例:
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>网易云音乐</title>
<link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
header {
background-color: #333;
color: #fff;
padding: 20px;
text-align: center;
}
h1 {
margin: 0;
}
.content {
display: flex;
flex-wrap: wrap;
justify-content: center;
padding: 20px;
}
.card {
width: 200px;
margin: 20px;
padding: 20px;
background-color: #f1f1f1;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.card i {
font-size: 24px;
margin-bottom: 10px;
}
.card p {
margin: 0;
}
</style>
</head>
<body>
<header>
<h1>网易云音乐</h1>
</header>
<div class="content">
<div class="card">
<i class="fa fa-music"></i>
<p>推荐音乐</p>
</div>
<div class="card">
<i class="fa fa-heart"></i>
<p>我的收藏</p>
</div>
<div class="card">
<i class="fa fa-user"></i>
<p>个人中心</p>
</div>
</div>
</body>
</html>
```
这是一个简单的网易云音乐App首页的前端代码,包含一个顶部标题栏和三个卡片,每个卡片代表一个功能模块。你可以根据需要进行样式修改和功能拓展。注意,为了正确显示图标,需要引入Font Awesome的CSS文件。