HTML/CSS 男人的衣柜
代码1:
<!DOCTYPE html>
<thml>
<head>
<meta name="keywords" content="zidingyi">
<meta name="description" content="zidingyi">
<meta charset="UTF-8">
<title>man clothes</title>
<style>
body {
background-color: rgb(244, 244, 244);
}
.main {
width: 288px;
height: 404px;
background-color: #fff;
/* border: 1px solid red; */
text-align: center;
box-sizing: border-box;
}
.main .shirt-pho a img {
width: 206px;
height: 187px;
padding: 46px 0;
}
.main .shirt-text {
width: 228px;
height: 44px;
margin: 0 auto;
}
.main .shirt-text a {
text-decoration: none;
color:rgb(72, 67, 60);
font-size: 16px;
}
.main .shirt-text a:hover {
color: red;
}
.main .price {
font-size: 20px;
padding: 28px 0;
color: rgb(225, 61, 64);
font-weight: 700;
}
</style>
</head>
<body>
<div class="main">
<div class="shirt-pho">
<a href="#">
<img src="img/manT-shirt pic.png" alt="">
</a>
</div>
<div class="shirt-text">
<a href="#">BOOSGARTH男装短袖t恤男士佳佳宽松翻领polo衫青年休闲</a>
</div>
<div class="price">¥188.0</div>
</div>
</body>
</thml>
显示1:
代码2:
<!DOCTYPE html>
<thml>
<head>
<meta name="keywords" content="zidingyi">
<meta name="description" content="zidingyi">
<meta charset="UTF-8">
<title>man clothes</title>
<style>
body {
background-color: rgb(244, 244, 244);
}
.all {
display: inline-block;
width: 1465px;
/* height: 834px; */
background-color:#eee;
font-size: 0;
}
.main {
width: 288px;
height: 404px;
background-color: #fff;
/* border: 1px solid red; */
text-align: center;
box-sizing: border-box;
display: inline-block;
/* font-size: 0; */
margin: 2px 0;
margin-right: 5px;
}
.main .shirt-pho a img {
width: 206px;
height: 187px;
padding: 46px 0;
}
.main .shirt-text {
width: 228px;
height: 44px;
margin: 0 auto;
}
.main .shirt-text a {
text-decoration: none;
color:rgb(72, 67, 60);
font-size: 16px;
}
.main .shirt-text a:hover {
color: red;
}
.main .price {
font-size: 20px;
padding: 28px 0;
color: rgb(225, 61, 64);
font-weight: 700;
}
</style>
</head>
<body>
<div class="all">
<div class="main">
<div class="shirt-pho">
<a href="#">
<img src="img/manT-shirt pic.png" alt="">
</a>
</div>
<div class="shirt-text">
<a href="#">BOOSGARTH男装短袖t恤男士佳佳宽松翻领polo衫青年休闲</a>
</div>
<div class="price">¥188.0</div>
</div>
<div class="main">
<div class="shirt-pho">
<a href="#">
<img src="img/manT-shirt pic.png" alt="">
</a>
</div>
<div class="shirt-text">
<a href="#">BOOSGARTH男装短袖t恤男士佳佳宽松翻领polo衫青年休闲</a>
</div>
<div class="price">¥188.0</div>
</div>
<div class="main">
<div class="shirt-pho">
<a href="#">
<img src="img/manT-shirt pic.png" alt="">
</a>
</div>
<div class="shirt-text">
<a href="#">BOOSGARTH男装短袖t恤男士佳佳宽松翻领polo衫青年休闲</a>
</div>
<div class="price">¥188.0</div>
</div>
<div class="main">
<div class="shirt-pho">
<a href="#">
<img src="img/manT-shirt pic.png" alt="">
</a>
</div>
<div class="shirt-text">
<a href="#">BOOSGARTH男装短袖t恤男士佳佳宽松翻领polo衫青年休闲</a>
</div>
<div class="price">¥188.0</div>
</div>
<div class="main">
<div class="shirt-pho">
<a href="#">
<img src="img/manT-shirt pic.png" alt="">
</a>
</div>
<div class="shirt-text">
<a href="#">BOOSGARTH男装短袖t恤男士佳佳宽松翻领polo衫青年休闲</a>
</div>
<div class="price">¥188.0</div>
</div>
<div class="main">
<div class="shirt-pho">
<a href="#">
<img src="img/manT-shirt pic.png" alt="">
</a>
</div>
<div class="shirt-text">
<a href="#">BOOSGARTH男装短袖t恤男士佳佳宽松翻领polo衫青年休闲</a>
</div>
<div class="price">¥188.0</div>
</div>
<div class="main">
<div class="shirt-pho">
<a href="#">
<img src="img/manT-shirt pic.png" alt="">
</a>
</div>
<div class="shirt-text">
<a href="#">BOOSGARTH男装短袖t恤男士佳佳宽松翻领polo衫青年休闲</a>
</div>
<div class="price">¥188.0</div>
</div>
<div class="main">
<div class="shirt-pho">
<a href="#">
<img src="img/manT-shirt pic.png" alt="">
</a>
</div>
<div class="shirt-text">
<a href="#">BOOSGARTH男装短袖t恤男士佳佳宽松翻领polo衫青年休闲</a>
</div>
<div class="price">¥188.0</div>
</div>
<div class="main">
<div class="shirt-pho">
<a href="#">
<img src="img/manT-shirt pic.png" alt="">
</a>
</div>
<div class="shirt-text">
<a href="#">BOOSGARTH男装短袖t恤男士佳佳宽松翻领polo衫青年休闲</a>
</div>
<div class="price">¥188.0</div>
</div>
<div class="main">
<div class="shirt-pho">
<a href="#">
<img src="img/manT-shirt pic.png" alt="">
</a>
</div>
<div class="shirt-text">
<a href="#">BOOSGARTH男装短袖t恤男士佳佳宽松翻领polo衫青年休闲</a>
</div>
<div class="price">¥188.0</div>
</div>
</div>
</body>
</thml>
显示2: