Web应用课-2.3-个人名片-stackoverflow

2.1 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="style.css">
</head>
<body>
<div class="container">
<div class="child-1">
Date April 4, 2023 at 14:02
</div>
<div class="child-2">
<img src="/iamges/dog1.jpg" alt="">
<div class="child-2-1">
<div class="child-2-1-1">
<a href="#">pan1cky</a>
</div>
<div class="child-2-1-2">
<span class="child-2-1-2-1">1314</span>
<div style="background-color: #FFCC01;" class="reputation-item"></div>
<span class="child-2-1-2-2">5</span>
<div style="background-color: #b4b8bc;" class="reputation-item"></div>
<span class="child-2-1-2-3">2</span>
<div style="background-color: #D1A684;" class="reputation-item"></div>
<span class="child-2-1-2-4">0</span>
</div>
</div>
</div>
</div>
</body>
</html>
12.2 css
* {
margin: 0;
padding: 0;
}
.container {
background-color: #d9eaf7;
width: 380px;
height: 160px;
border-radius: 20px;
margin: 100px auto;
}
.child-1 {
height: 60px;
line-height: 60px;
color: #838282;
padding-left: 20px;
letter-spacing: 1px;
}
.child-2 > img {
float: left;
width: 78px;
height: 74px;
padding-left: 20px;
}
.child-2 > div {
float: left;
padding-left: 20px;
}
.child-2-1-1 > a {
height: 40px;
line-height: 40px;
color: #0075cc;
font-weight: bold;
font-size: large;
text-decoration: none;
}
.child-2-1-2 {
height: 34px;
line-height: 34px;
}
.child-2-1-2-1 {
color: #6a9385;
font-weight: bold;
}
.child-2-1-2-2 {
color: #838d96;
}
.child-2-1-2-3 {
color: #848d97;
}
.child-2-1-2-4 {
color: #838ca9;
}
.reputation-item {
width: 6px;
height: 6px;
display: inline-block;
border-radius: 50%;
margin: 0 3px 0 2px;
position: relative;
top: -2px;
}