视觉差
html代码:
<!--小鹿--> <div class="box1"> <p class="top">杨杨的视觉差作业</p> </div> <!--小马--> <div class="box2"> <p>杨杨的视觉差作业</p> </div> <!--斑马--> <div class="box3"> <p>杨杨的视觉差作业</p> </div>
css代码:
* { padding: 0; margin: 0; } .box1 { width:100%; height:1300px; /* background:red; */ background:url(images/bg1.png) center center no-repeat fixed; overflow:hidden; } .box2 { width:100%; height:1300px; /* background:green; */ background:url(images/bg2.png) center center no-repeat fixed; } .box3 { width:100%; height:1300px; /* background:blue; */ background:url(images/bg3.png) center center no-repeat fixed; } p{ background:rgba(255,255,255,0.8) ; height:200px; width:100%; font-size:24px; font-weight:800; text-align:center; line-height:200px; } .top{ margin-top:280px; }