-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
61 lines (61 loc) · 1.94 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>头像和按钮示例</title>
<style>
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background-image: url('your-background-image-url.jpg'); /* 替换为你的背景图片URL */
background-size: cover;
background-position: center;
}
.container {
text-align: center;
background-color: rgba(255, 255, 255, 0.8); /* 半透明背景,便于看清内容 */
padding: 20px;
border-radius: 15px;
}
img {
width: 100px; /* 替换为你需要的头像大小 */
height: 100px;
border-radius: 50%; /* 让头像变成圆形 */
}
.button {
background-color: orange; /* 橙色按钮 */
color: white;
border: none;
padding: 10px 20px;
margin: 10px;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s; /* 添加过渡效果 */
}
.button:hover {
background-color: darkorange; /* 悬停时的颜色 */
}
.nickname {
color: black; /* 昵称的颜色 */
font-size: 20px; /* 昵称的字体大小 */
margin-top: 10px; /* 昵称与头像的距离 */
}
</style>
</head>
<body>
<div class="container">
<img src="your-avatar-url.jpg" alt="头像"> <!-- 替换为你的头像URL -->
<div class="nickname">你的昵称</div> <!-- 替换为你的昵称 -->
<div>
<button class="button">按钮 1</button>
<button class="button">按钮 2</button>
</div>
</div>
</body>
</html>