麻烦老师检查一下代码,有什么需要修改的
来源:4-10 自由编程
			Yuujio
2021-05-08 20:19:14
<div class="library">
<div id="library">
<div class="img">
<img src="images/b1.jpg">
</div>
<div class="text">
<h3>Library</h3>
<p>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 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>
<div id="computer lab">
<div class="img">
<img src="images/b2.jpg">
</div>
<div class="text">
<h3>Computer Lab</h3>
<p>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 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>
<div id="conference hall">
<div class="text">
<h3>Conference Hall</h3>
<p>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 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">
<img src="images/b3.jpg">
</div>
</div>
<div id="play ground">
<div class="text">
<h3>Play Ground</h3>
<p>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 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">
<img src="images/b4.jpg">
</div>
</div>
</div>
.library{
    width: 100%;
    height: 760px;
}
.library .img{
    width: 25%;
    height: 380px;
    float: left;
}
.library .text{
    width: 25%;
    height: 380px;
    float: left;
    background-color: #07cbc9;
    color: whitesmoke;
}
.library .img img{
    width: 100%;
    height: 380px;
}
.library .text h3{
    display: block;
    font-size: 24px;
    margin: 20px 0 30px 20px;
}
.library .text p{
    font-size: 16px;
    display: block;
    margin-bottom: 20px;
    margin-left: 20px;
}
.library .text p.p2{
    font-size: 14px;
    color: grey;
    margin-bottom: 30px;
    margin-left: 20px;
}
.library .text button{
    display: block;
    width: 138px;
    height: 40px;
    background-color: black;
    color: whitesmoke;
    margin: 0 auto;
}
1回答
					好帮手慕然然
2021-05-09
同学你好,代码实现效果基本没问题,不过代码中存在需要优化的地方,参考如下:
1、建议将按钮的样式优化一下,去除默认的外边框,参考如下

2、图文混排布局建议优化一下,可参考如下思路:
祝学习愉快!
相似问题
回答 1
回答 2