<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<head>
<div class="social-icons">
<!-- 使用Font Awesome图标 -->
<a href="#" class="social-icon" title="哔哩哔哩">
<i class="fab fa-bilibili"></i>
</a>
<a href="#" class="social-icon" title="抖音">
<i class="fab fa-tiktok"></i>
</a>
<a href="#" class="social-icon" title="小红书">
<i class="fas fa-book"></i> <!-- 小红书没有官方图标,可以用书代替 -->
</a>
<a href="mailto:your@email.com" class="social-icon" title="邮箱">
<i class="fas fa-envelope"></i>
</a>
</div>
<style>
/* 基础样式 */
.main-container {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
padding: 20px;
}
.profile {
background: white;
border-radius: 20px;
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
padding: 30px;
text-align: center;
max-width: 350px;
width: 100%;
transition: transform 0.3s ease;
}
.profile:hover {
transform: translateY(-5px);
}
.avatar-frame {
width: 150px;
height: 150px;
border-radius: 50%;
margin: 0 auto 20px;
padding: 5px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.profile-img {
width: 100%;
height: 100%;
border-radius: 50%;
object-fit: cover;
border: 3px solid white;
}
.profile-name {
font-size: 24px;
font-weight: 700;
color: #333;
margin-bottom: 5px;
}
.profile-title {
font-size: 16px;
color: #667eea;
margin-bottom: 20px;
font-weight: 500;
}
.social-icons {
display: flex;
justify-content: center;
gap: 15px;
}
.social-icon {
width: 40px;
height: 40px;
border-radius: 50%;
background: #f5f7fa;
display: flex;
align-items: center;
justify-content: center;
color: #667eea;
font-size: 18px;
transition: all 0.3s ease;
text-decoration: none;
}
.social-icon:hover {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
transform: translateY(-3px);
}
index.html
style.css
index.js