麻烦老师看一下代码的正确性和规范性

麻烦老师看一下代码的正确性和规范性

具体遇到的问题

报错信息的截图

相关课程内容截图

尝试过的解决思路和结果

粘贴全部相关代码,切记添加代码注释(请勿截图)

<!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;
}

正在回答

登陆购买课程后可参与讨论,去登陆

1回答

同学你好,指向三角形没有实现垂直居中。建议优化:

http://img1.sycdn.imooc.com//climg/5fab408f0905666a02550256.jpg

http://img1.sycdn.imooc.com//climg/5fab4085091e287a03030243.jpg

其他效果正确。祝学习愉快~

  • 日拱一卒_ 提问者 #1
    好的,谢谢老师
    2020-11-11 17:13:26
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师