我知道这是一个菜鸟问题,但我就是想不通!我正在为我们的 Intranet 布置一个页面,我需要做的就是并排放置一些 div。每个容器都是不同的项目,但所有容器都具有相同的结构、标题、一些描述性文本和图像。我将添加给我的项目。这基本上只是我为员工创建的用于销售物品的页面。这是我的 css 和我想要实现的图像。如果这没有意义,请告诉我,但正如你们过去证明的那样聪明,我相信你明白了。
.wrapper {
width: 1260px;
height: 900px;
margin: 0px auto;
position: relative;
}
.container {
width: 400px;
height: 400px;
margin: 10px;
position: absolute;
}
.itemText {
width: 350px;
height: 190px;
padding: 0px;
position: absolute;
top: 25px;
left: 25px;
}
.itemHead {
padding: 0px;
margin: 0px;
}
.itemDesc {
padding: 10px;
margin: 0px;
}
.itemThumb {
width: 350px;
height: 150px;
position: absolute;
bottom: 25px;
left: 25px;
}
我的 HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/text.css">
<link rel="stylesheet" href="css/style.css">
<title>Document</title>
</head>
<body>
<div class="wrapper">
<div class="container">
<div class="itemText">
<div class="itemHead">
<p>Lorem ipsum.</p>
</div>
<div class="itemDesc">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Iusto, placeat, aliquid tempore harum similique quo deleniti velit eum labore est?</p>
</div>
</div>
<div class="itemThumb"></div>
</div>
<div class="container">
<div class="itemText">
<div class="itemHead">
<p>Lorem ipsum.</p>
</div>
<div class="itemDesc">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Iusto, placeat, aliquid tempore harum similique quo deleniti velit eum labore est?</p>
</div>
</div>
<div class="itemThumb"></div>
</div>
<div class="container">
<div class="itemText">
<div class="itemHead">
<p>Lorem ipsum.</p>
</div>
<div class="itemDesc">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Iusto, placeat, aliquid tempore harum similique quo deleniti velit eum labore est?</p>
</div>
</div>
<div class="itemThumb"></div>
</div>
</div>
</body>
</html>