麻烦老师检查代码

来源:4-10 自由编程

淡淡嚣风

2021-03-10 10:56:29

相关截图:

http://img.mukewang.com/climg/604834da095fca8a19190866.jpg

相关代码:

<!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/css.css">
</head>

<body>
<!-- 图文混排区域 -->
<div class="imgs-and-words">
<div class="img box"><img src="images/b1.jpg" alt=""></div>
<div class="word box">
<h3>Library</h3>
<p class="words-up"> Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>
<p class="words-down">Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
<button>EXPLORE</button>
</div>
<div class="img box"><img src="images//b2.jpg" alt=""></div>
<div class="word box">
<h3>Library</h3>
<p class="words-up"> Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>
<p class="words-down">Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
<button>EXPLORE</button>
</div>
<div class="word box">
<h3>Library</h3>
<p class="words-up"> Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>
<p class="words-down">Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
<button>EXPLORE</button>
</div>
<div class="img box"><img src="images/b3.jpg" alt=""></div>
<div class="word box">
<h3>Library</h3>
<p class="words-up"> Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>
<p class="words-down">Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
<button>EXPLORE</button>
</div>
<div class="img box"><img src="images/b4.jpg" alt=""></div>
</div>
</body>

</html>

相关代码:

​* {
margin: 0;
padding: 0;
}

li {
list-style: none;
}

header {
background-color: #07cbc9;
height: 80px;
}

header .web {
width: 1200px;
margin: 0 auto;
}


/* 图文混排区域 */

.imgs-and-words {
width: 100%;
overflow: hidden;
background-color: #07cbc9;
}

.imgs-and-words .box {
float: left;
width: 25%;
height: 380px;
}

.imgs-and-words .img img {
display: block;
height: 380px;
width: 100%;
}

.imgs-and-words .word {
position: relative;
box-sizing: border-box;
padding: 20px;
}

.imgs-and-words .word h3 {
color: white;
font-size: 24px;
margin-bottom: 30px;
}

.imgs-and-words .word .words-up {
color: white;
font-size: 16px;
margin-bottom: 20px;
}

.imgs-and-words .word .words-down {
color: gray;
font-size: 14px;
margin-bottom: 30px;
}

.imgs-and-words .word button {
position: absolute;
border: none;
width: 138px;
height: 40px;
color: white;
background-color: black;
left: 50%;
margin-left: -69px;
}


写回答

1回答

好帮手慕夭夭

2021-03-10

同学你好,代码实现正确,很棒!继续加油,祝学习愉快~

0

0 学习 · 15276 问题

查看课程