关于ABOUT下半区
<div class="about-buttom"> <div class="about-buttom1"> <ul> <li><img src="images/b1.jpg"></li> <li> <div class="div1"> <h2>Library</h2> <h3>Lorem Ipsum is simply dummy text of the printing and typesetting industry</h3> <p> 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> <input type="button" name="" value="EXPLORE"> </div> </li> <li><img src="images/b2.jpg"></li> <li> <div class="div2"> <h2>Computer Lab</h2> <h3>Lorem Ipsum is simply dummy text of the printing and typesetting industry</h3> <p> 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> <input type="button" name="" value="EXPLORE"> </div> </li> <li> <div class="div3"> <h2>Conference Hall</h2> <h3>Lorem Ipsum is simply dummy text of the printing and typesetting industry</h3> <p> 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> <input type="button" name="" value="EXPLORE"> </div> </li> <li><img src="images/b3.jpg"></li> <li> <div class="div4"> <h2>Play Ground</h2> <h3>Lorem Ipsum is simply dummy text of the printing and typesetting industry</h3> <p> 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> <input type="button" name="" value="EXPLORE"> </div> </li> <li><img src="images/b4.jpg"></li> </ul> </div> </div>
如何设置成上下2行4列,应为浏览器宽度是100%,没有固定,不好计算,后然发现ABOUT上半区图片的左右两侧也会随着浏览器的页面放大缩小位置相对图片变化,老师这个怎么解决?
26
收起
正在回答
1回答
同学你好,由于同学只贴出来html的代码,同学可以根据如下思路进行实现
about上半部分:
1,设置一个大的div宽度为1100px,并使用margin:0 auto;设置居中。
2,里面3个小的div,设置浮动使显示在一行,调整宽度。最后再设置左侧内容绝对定位,要相对于上面说到的大div。具体该填充多少值可以参考原型图。
about区下半部分:设置一个大的div容器,里面有八个小模块,分别容纳图片和内容,分别给8个不同的模块设置左浮动,这样就能横向显示;并且每个小模块的宽度为25%,并设置固定高度;里面的div与图片宽度是100%;这样正好一排显示4个。
如果我的回答解决了你的疑惑,请采纳!祝学习愉快!
java工程师2020版
- 参与学习 人
- 提交作业 9393 份
- 解答问题 16556 个
综合就业常年第一,编程排行常年霸榜,无需脱产即可学习,北上广深月薪过万 无论你是未就业的学生还是想转行的在职人员,不需要基础,只要你有梦想,想高薪
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星