css盒子模型的简单应用
来源:互联网 发布:js中引用java变量 编辑:程序博客网 时间:2024/05/21 17:17
以某个网站的总体框架为例,学习css盒子模型的思想,可以为以后我们进行网站框架构思的时候提供帮助。
html代码:
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>盒子模型的应用</title> <link href="Mycss.css" type="text/css" rel="stylesheet"></head><body><div class="heading"> <div class="heading_content"></div></div><div class="body"> <div class="body_image"></div> <div class="body_notice"></div> <div class="boty_content"></div></div><div class="footing"> <div class="footing_guide"></div> <div class="footing_reference"></div></div></body></html>css代码:注意margin属性设置为auto自动,这样系统自动的为块分配在最适合界面的中间位置
*{ margin: 0px; padding: 0px;}.heading{ width: 100%; height: 50px; background-color: black;}.heading_content{ width: 75%; height: 50px; background-color: blue; margin: auto;}.body{ width: 75%; margin: 20px auto; background-color: aqua; height: 400px;}.body_image{ width: 100%; height: 100px; background-color: aliceblue;}.body_notice{width: 100%; height: 50px; background-color: yellow;}.boty_content{width: 100%; height: 250px; background-color: chocolate;}.footing{ width: 75%; height: 200px; margin: 20px auto; background-color: brown;}.footing_guide{ width: 100%; height: 130px; background-color: dimgray;}.footing_reference{width: 100%; height: 70px; background-color: black;}盒子模型:
0 0
- css盒子模型的简单应用
- 简单的盒子模型Div+Css
- CSS盒子模型-盒子模型应用
- CSS的盒子模型
- CSS 的盒子模型
- css的盒子模型
- CSS的盒子模型
- CSS基础-18CSS盒子模型-盒子模型应用
- asp.net-css页面布局的应用-经典盒子模型
- 认识CSS的盒子模型
- CSS的盒子模型案例
- 什么是CSS的盒子模型
- 关于css的盒子模型
- css盒子模型的示例
- CSS盒子模型的定位
- 神奇的CSS盒子模型
- 盒子模型、CSS的定位
- css盒子模型的学习
- 深入理解拉格朗日乘子法(Lagrange Multiplier) 和KKT条件
- linphone-PresenceNote.java文件分析
- raspbian 默认从控制台启动
- Yarn设计思想
- 如何让HorizonScrollView中的子控件居中
- css盒子模型的简单应用
- 自定义Adapter填充listview
- mysql的函数
- PHP之MVC项目实战
- 03 Android的发展和平台数据(从01开始点点入门,视频+笔记)
- HDU 5773 The All-purpose Zero (LIS)
- atom插件推荐
- 【LeetCode】 013. Roman to Integer
- 5分钟搞定内存字节对齐