Web应用课blibli名片仿写
作者:
caicaii
,
2024-05-13 14:10:47
,
所有人可见
,
阅读 2
Web应用课blibli名片仿写
html代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="/css/index.css">
</head>
<body>
<div class="userCard">
<div class="userCard-head"></div>
<div class="userCard-body">
<div class="userCard-body-photo">
<a href="#">
<img src="https://cdn.acwing.com/media/user/profile/photo/175216_lg_90300cbeea.webp" alt="">
</a>
</div>
<div class="userCard-body-info">
<div class="userCard-body-info-first">
<div class="userCard-body-info-first-name">zc</div>
<div class="userCard-body-info-first-logo">
<img src="/static/images/logo.png" alt="图片无法显示">
</div>
<div class="userCard-body-info-first-vip">
年度大会员
</div>
</div>
<div class="userCard-body-info-second">
<div class="userCard-body-info-second-star">
<span style="color: #18191C;">223</span>
<span style="color: #9499A0;">关注</span>
</div>
<div class="userCard-body-info-second-fans">
<span style="color: #18191C;">3</span>
<span style="color: #9499A0;">粉丝</span>
</div>
<div class="userCard-body-info-second-praise">
<span style="color: #18191C;">4</span>
<span style="color: #9499A0;">获赞</span>
</div>
</div>
<div class="userCard-body-info-introduce">
拒绝动物表演,喜欢变形金刚所有角色,喜欢动物(尤其是鲸)
</div>
<button class="userCard-body-info-star">+关注</button>
<button class="userCard-body-info-submit">发消息</button>
</div>
</div>
</div>
</body>
</html>
css代码
.userCard {
width: 366px;
height: 262.6px;
box-sizing: border-box;
box-shadow: 1px 1px 5px gray;
}
.userCard-head {
width: 366px;
height: 85px;
background-image: url(/static/images/mountain.jpg);
box-sizing: border-box;
background-size: 366px;
}
.userCard-body {
width: 366px;
height: 177.6px;
}
.userCard div {
box-sizing: border-box;
}
.userCard-body-photo img {
width: 48px;
border-radius: 50%;
float: left;
margin: 7px;
}
.userCard-body-photo img:hover {
transform: scale(1.1);
transition: 0.5s;
}
.userCard-body-info {
margin-top: 7px;
}
.userCard-body-info-first {
margin-top: 4px;
margin-bottom: 8px;
}
.userCard-body-info-first-logo {
display: inline-block;
width: 20px;
margin-right: 5px;
}
.userCard-body-info-first img {
width: 16px;
text-align: center;
margin: 0 auto;
height: 16px;
line-height: 16px;
}
.userCard-body-info-first-name {
display: inline-block;
font-size: 16px;
font-weight: bold;
color: #FB7299;
margin-right: 5px;
}
.userCard-body-info-first-vip {
display: inline-block;
font-size: 8px;
font-weight: bold;
background-color: #FB7299;
color: white;
}
.userCard-body-info-second-star {
display: inline-block;
margin-right: 18px;
font-size: 12px;
}
.userCard-body-info-second-fans {
display: inline-block;
margin-right: 18px;
font-size: 12px;
}
.userCard-body-info-second-praise {
display: inline-block;
font-size: 12px;
}
.userCard-body-info-second span {
margin-right: 6px;
}
.userCard-body-info {
margin-left: 64px;
}
.userCard-body-info-introduce {
font-size: 12px;
color: #9499A0;
margin: 8px 0 10px 0;
width: 280px;
margin-bottom: 20px;
}
.userCard-body-info-star {
width: 100px;
height: 30px;
background-color: #00AEEC;
margin-right: 8px;
border: none;
box-shadow: -1px -1px 2px gray;
color: white;
cursor: pointer;
}
.userCard-body-info-star:hover {
background-color: #258bb1;
}
.userCard-body-info-submit {
width: 100px;
height: 30px;
background-color: #c4c7cb;
border: none;
box-shadow: -1px -1px 2px gray;
color: #61666D;
cursor: pointer;
}
.userCard-body-info-submit:hover {
background-color: #ced3da;
}