HTML+CSS+JS 拟态UI 个人主页制作教程
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>拟态UI 个人主页</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #fbfbfb;
}
<pre><code>.container {
display: flex;
flex-direction: column;
align-items: center;
padding: 20px;
border-radius: 10px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
background-color: #fff;
}
.avatar {
width: 150px;
height: 150px;
border-radius: 50%;
background-color: #dcdcdc;
margin-bottom: 20px;
}
.name {
font-size: 24px;
font-weight: bold;
margin-bottom: 10px;
}
.bio {
font-size: 16px;
margin-bottom: 20px;
}
.social-links {
display: flex;
justify-content: space-between;
width: 200px;
}
.social-links a {
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
border-radius: 50%;
background-color: #dcdcdc;
color: #333;
text-decoration: none;
}
.social-links a:hover {
background-color: #333;
color: #fff;
}
</code></pre>
</style>
</head>
<body>
<div class="container">
<div class="avatar"></div>
<div class="name">John Doe</div>
<div class="bio">Web Developer</div>
<div class="social-links">
<a href="#"><i class="fab fa-github"></i></a>
<a href="#"><i class="fab fa-twitter"></i></a>
<a href="#"><i class="fab fa-linkedin"></i></a>
<a href="#"><i class="fab fa-instagram"></i></a>
</div>
</div>
<script src="https://kit.fontawesome.com/a076d05399.js"></script>
</body>
</html>
原文地址: http://www.cveoy.top/t/topic/bxOK 著作权归作者所有。请勿转载和采集!