当前位置: 首页 > news >正文

川字结构布局/国字结构布局

1.串字结构布局

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>.main{width: 1000px;height: 800px;background-color: gray;border: 1px solid black;/* 外边距 */margin: 0px auto;}.left{/* 定位方式 */position: relative;width: 180px;height: 700px;background-color: green;border: 1px solid black;/* 距离父盒子顶部距离 */top: 50px;/* 盒子的左外边距 */margin-left: 15px;/* 浮动方式 */float: left;}.middle{position:relative;width: 600px;height: 700px;background-color: aquamarine;border: 1px solid black;float: left;top: 50px;}.right{position: relative;width: 180px;height: 700px;background-color: green;border: 1px solid black;float: left;top: 50px;}</style></head><body><div class="main"><div class="left">left</div><div class="middle">middle</div><div class="right">right</div></div>    
</body>
</html>

2.国字结构布局

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>div{border: 1px solid black;}.wrap{width: 800px;height: 700px;}.top{width: 762px;height: 100px;background-color: aquamarine;margin:20px 20px 0 20px;}.left{width: 380px;height: 460px;background-color: gray;float: left;margin-left: 20px;}.right{width: 380px;height: 460px;background-color: gray;float: left;}.bottom{/* 保证当前块级元素不会重叠 */clear: both;width: 762px;height: 100px;background-color: aquamarine;margin-left: 20px;}</style>
</head><body><div class="wrap"><div class="top">top</div><div class="left">left</div><div class="right">right</div><div class="bottom">bottom</div></div></body>
</html>

课后作业

思考下面的如何制作

首先是top位置是一张图片

然后是left是文字描述

right也是文字秒速

bottom是版权信息也是文字描述,

最后依次替换即可

照片 

 代码

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>div{border: 1px solid black;}.wrap{width: 800px;height: 700px;}.top{width: 762px;height: 100px;background-color: aquamarine;margin:20px 20px 0 20px;background-image:url("banner.png");}.left{width: 380px;height: 460px;background-color: gray;float: left;margin-left: 20px;}.right{width: 380px;height: 460px;background-color: gray;float: left;}.bottom{/* 保证当前块级元素不会重叠 */clear: both;width: 762px;height: 100px;background-color: aquamarine;margin-left: 20px;}p{text-align: center;}</style>
</head><body><div class="wrap"><img src="./banner.png" alt="" class="top"><div class="left"><p>什么是甲流</p>甲流一般指甲型流感,主要是由于受到甲型流感病毒感染所引起的急性呼吸道传染病。<p>甲流症状有哪些</p>通常会出现高热、头痛、乏力、肌肉酸痛、食欲减退、咽喉肿痛等各种不良症状。甲型流感早期症状特别类似于普通感冒,但是部分患者很可能会出现消化道症状,并且是具有传染性,主要是通过空气中的飞沫进行传播,也可能会通过密切接触进行传播。</div><div class="right"><p>甲流的预防措施</p>第一、注意个人卫生 在平时的生活当中,应该注意做好个人的清洁卫生工作,尤其是年龄小的孩子,要做到勤洗手、勤换衣服,讲究卫生,小心因为不讲卫生所引发的感染。第二、注意调节饮食 在饮食方面要注意做好荤素搭配,保证充足的营养补给,多吃新鲜的蔬菜和水果,提高身体抵抗力。在做饭的时候生熟要分开,尤其是猪肉要彻底烹饪熟了,这样才能将甲流病毒杀死。第三、进行体育锻炼 平时进行适当的体育锻炼,有助于提高身体的抵抗力,增强对方甲流的能力,可以结合个人的身体状况,到外面散散步、跑跑步、打打球等,但也要注意控制好量,不能过于劳累。第四、接种流感疫苗 接种流感疫苗是预防甲流非常不错的一种方式,但要把握好接种的时间,在每年甲流发病的高峰期前一段时间要及时接种。第五、加强保暖 日常应该注意加强保暖,尤其是在寒冷的冬季要注意及时增加衣物,减少因为着凉等所引发的被传染。第六、文明咳嗽 甲型流感在咳嗽期间很容易把病毒散播到空气中,所以打喷嚏最好使用口罩遮住口鼻,避免飞沫污染他人。</div><div class="bottom"><p>版权所有&copy;东方翱翔</p></div></div></body>
</html>


http://www.mrgr.cn/news/49588.html

相关文章:

  • MobileViews: A Large-Scale Mobile GUI Dataset论文学习
  • DC-6靶机渗透
  • MyBatis环境配置详细过程
  • 【Qt】窗口关闭提示框
  • C语言有关结构体的知识(后有通讯录的实现)
  • 【国科大】C++程序设计秋季——五子棋
  • 利用编程思维做题之将两个有序的单链表合并成一个新的有序单链表
  • 小红书系统教程05(小红书本质)
  • linux手册翻译 execve
  • 【英特尔IA-32架构软件开发者开发手册第3卷:系统编程指南】2001年版翻译,1-7
  • 公开课 | 2024最新清华大模型公开课 第3课 神经网络与大模型基础 Part 2
  • openpyxl -- Cell
  • 中国中铁下属设计院盘点
  • Base16编码解码在线工具
  • RabbitMQ 如何保证消息不丢失?
  • VS中创建QT项目。
  • 【环境搭建】更换电脑后的开发环境怎么重建
  • 双目视觉搭配YOLO实现3D测量
  • 【双指针算法】移动零
  • 6.Pytest快速上手