麻烦老师看一下代码的正确性和规范性
具体遇到的问题
报错信息的截图
相关课程内容截图
尝试过的解决思路和结果
粘贴全部相关代码,切记添加代码注释(请勿截图)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>aboutPlus4_10</title>
<link rel="stylesheet" href="css/aboutPlus4_10.css">
</head>
<div class="content">
<img src="images/b1.jpg" alt="">
<div class="text text1">
<span>Library</span>
<p class="p1">Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p>
<p class="p2">
Lorem Ipsum has been the industry's standard dummy test ever since the 1500s, when an unknown printer took a galley of type and scrambled to make a type specimen book.
</p>
<div class="btn">EXPLORE</div>
</div>
<img src="images/b2.jpg" alt="">
<div class="text text1">
<span>Library</span>
<p class="p1">Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p>
<p class="p2">
Lorem Ipsum has been the industry's standard dummy test ever since the 1500s, when an unknown printer took a galley of type and scrambled to make a type specimen book.
</p>
<div class="btn">EXPLORE</div>
</div>
<div class="text text2">
<span>Library</span>
<p class="p1">Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p>
<p class="p2">
Lorem Ipsum has been the industry's standard dummy test ever since the 1500s, when an unknown printer took a galley of type and scrambled to make a type specimen book.
</p>
<div class="btn">EXPLORE</div>
</div>
<img src="images/b3.jpg" alt="">
<div class="text text2">
<span>Library</span>
<p class="p1">Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p>
<p class="p2">
Lorem Ipsum has been the industry's standard dummy test ever since the 1500s, when an unknown printer took a galley of type and scrambled to make a type specimen book.
</p>
<div class="btn">EXPLORE</div>
</div>
<img class="img4" src="images/b4.jpg" alt="">
</div>
<body>
</body>
</html>
* {
margin: 0;
padding: 0;
}
.content {
width: 100%;
overflow: hidden;
position: relative;
}
img {
float: left;
width: 25%;
height: 380px;
}
.content .text {
float: left;
background: #07cbc9;
width: 25%;
height: 380px;
position: relative;
}
span {
display: block;
font-size: 24px;
margin-top: 20px;
margin-left: 20px;
color: white;
font-weight: bold;
}
.p1 {
font-size: 16px;
margin-top: 30px;
margin-left: 20px;
margin-bottom: 20px;
color: white;
}
.p2 {
font-size: 14px;
color: gray;
margin-left: 20px;
margin-bottom: 30px;
}
.btn {
width: 138px;
height: 40px;
background: black;
color: white;
text-align: center;
line-height: 40px;
margin: 0 auto;
}
.text::before {
content: "";
width: 0;
height: 0;
position: absolute;
top: 50%;
margin-top: -15px;
}
.text1::before {
border: 30px solid transparent;
border-right-color: #07cbc9;
left: -58px;
}
.text2::before {
border: 30px solid transparent;
border-left-color: #07cbc9;
right: -58px;
}
19
收起
正在回答
1回答
同学你好,指向三角形没有实现垂直居中。建议优化:
其他效果正确。祝学习愉快~
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星