html and css 制作个人资料显示卡id1094-网页前端设计

本示例展示如何使用HTML和CSS创建一个简洁美观的个人资料卡,包括图片、个人信息、社交链接及统计数据等元素。通过巧妙的布局和渐变背景效果提升视觉吸引力。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

html and css 制作个人资料显示卡id1094-网页前端设计在这里插入图片描述
源码下载地址

查看在线演示

html

<!DOCTYPE html>
<html lang="en">
<head>
 <meta charset="UTF-8">
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
 <title></title>
 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css"/>
 <link rel="stylesheet" href="style.css">
</head>
<body>
 <div class="profile-card">
 <div class="card-header">
 <div class="pic">
 <img src="pic.png" alt="">
 </div>
 <div class="name">John Doe</div>
 <div class="desc">Developer & Designer</div>
 <div class="sm">
 <a href="#" class="fab fa-facebook-f"></a>
 <a href="#" class="fab fa-twitter"></a>
 <a href="#" class="fab fa-github"></a>
 <a href="#" class="fab fa-youtube"></a>
 </div>
 <a href="#" class="contact-btn">Contact Me</a>
 </div>
 <div class="card-footer">
 <div class="numbers">
 <div class="item">
 <span>120</span>
 Posts
 </div>
 <div class="border"></div>
 <div class="item">
 <span>127</span>
 Following
 </div>
 <div class="border"></div>
 <div class="item">
 <span>120K</span>
 Followers
 </div>
 </div>
 </div>
 </div>
</body>
</html>

css

*{
  margin: 0;
  padding: 0;
  font-family: "Ubuntu", sans-serif;
  box-sizing: border-box;
  text-decoration: none;
}

body{
  height: 100vh;
  background: url(bg.jpg) no-repeat center;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-card{
  width: 400px;
  text-align: center;
  border-radius: 8px;
  overflow: hidden;
}

.card-header{
  background: #2c3a47;
  padding: 60px 40px;
}

.pic{
  display: inline-block;
  padding: 8px;
  background: linear-gradient(130deg, #74b9ff, #e66767);
  margin: auto;
  border-radius: 50%;
  background-size: 200% 200%;
  animation: animated-gradient 2s linear infinite;
}

@keyframes animated-gradient{
  25%{
    background-position: left bottom;
  }
  50%{
    background-position: right bottom;
  }
  75%{
    background-position: right top;
  }
  100%{
    background-position: left top;
  }
}

.pic img{
  display: block;
  width: 100px;
  height: 100px;
  border-radius: 50%;
}

.name{
  color: #f2f2f2;
  font-size: 28px;
  font-weight: 600;
  margin: 10px 0;
}

.desc{
  font-size: 18px;
  color: #e66767;
}

.sm{
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.sm a{
  color: #f2f2f2;
  width: 56px;
  font-size: 22px;
  transition: .3s linear;
}

.sm a:hover{
  color: #e66767;
}

.contact-btn{
  display: inline-block;
  padding: 12px 50px;
  color: #e66767;
  border: 2px solid #e66767;
  border-radius: 6px;
  margin-top: 16px;
  transition: .3s linear;
}

.contact-btn:hover{
  background: #e66767;
  color: #f2f2f2;
}

.card-footer{
  background: #f4f4f4;
  padding: 60px 10px;
}

.numbers{
  display: flex;
  align-items: center;
}

.item{
  flex: 1;
  text-transform: uppercase;
  font-size: 13px;
  color: #e66767;
}

.item span{
  display: block;
  color: #2c3a47;
  font-size: 30px;
}

.border{
  width: 1px;
  height: 30px;
  background: #bbb;
}

源码下载地址

查看在线演示

点赞 评论 转发就是对up的最大支持和鼓励, 非常谢谢!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值