公共课-版心与布局流程

2023-10-31 18:50
文章标签 流程 布局 版心 公共课

本文主要是介绍公共课-版心与布局流程,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

文章目录

  • 1、版心
  • 2、布局流程
    • (1)一列固定宽度且居中
    • (2)两列左窄右型
    • (3)通栏平均分布型

1、版心

版心:是指网页中主体内容所在的区域

一般尺寸为: 960 980 1000 1200 1190

2、布局流程

由外到内,由大到小

(1)一列固定宽度且居中

image-20210410100958324

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8" /><title>一列固定宽度且居中</title><style>* {margin: 0;padding: 0;}.container {margin: auto;width: 1200px;}header,.banner,.main,footer {margin-top: 20px;border: 5px dashed #f00;background-color: green;text-align: center;font-size: 60px;font-weight: bold;}header {margin-top: 0;height: 150px;line-height: 150px;}.banner {height: 100px;line-height: 100px;}.main {height: 300px;line-height: 300px;}footer {height: 200px;line-height: 200px;}</style></head><body><div class="container"><header>header</header><section class="banner">banner</section><section class="main">main</section><footer>footer</footer></div></body>
</html>

(2)两列左窄右型

image-20210410102443125

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>两列左窄右宽型</title><style>.box {margin: auto;width: 1200px;}header,.banner,.main,footer {margin-top: 10px;border: 5px dashed red;background-color: green;text-align: center;font-size: 60px;}header {margin-top: 0;height: 150px;line-height: 150px;}.banner {height: 60px;line-height: 60px;}.main {height: 400px;line-height: 400px;border: 0;background-color: white;}footer {height: 200px;line-height: 200px;}.leftBox,.rightBox {float: left;border: 5px dashed red;background-color: green;height: 390px;}.leftBox {width: 400px;}.rightBox {float: right;width: 770px;}</style>
</head><body><div class="box"><header>top</header><section class="banner">banner</section><section class="main"><div class="leftBox">left</div><div class="rightBox">right</div></section><footer>footer</footer></div></html>

(3)通栏平均分布型

image-20210410110029141

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><title>通栏平均分布型</title><style>header,footer,.banner,.mid1,.bottom1 {background-color: violet;border: 1px dotted black;text-align: center;}header {height: 50px;line-height: 50px;}footer {height: 100px;line-height: 100px;}.main {margin: 10px auto;width: 1200px;}.banner {height: 100px;line-height: 100px;}.main-middle {height: 80px;margin: 10px 0;}.main-bottom {height: 200px;}.mid1 {float: left;width: 290.5px;height: 78px;margin-left: 10px;}.midFrist {margin-left: 0px;}.bottom1 {float: left;margin-left: 10px;width: 290.5px;height: 198px;}.bottomFirst {margin-left: 0;}</style></head><body><header>top</header><div class="main"><section class="banner">banner</section><section class="main-middle"><div class="mid1 midFrist"></div><div class="mid1"></div><div class="mid1"></div><div class="mid1"></div></section><section class="main-bottom"><div class="bottom1 bottomFirst"></div><div class="bottom1"></div><div class="bottom1"></div><div class="bottom1"></div></section></div><footer>footer</footer></body>
</html>

这篇关于公共课-版心与布局流程的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/317384

相关文章

Spring Boot 中的默认异常处理机制及执行流程

《SpringBoot中的默认异常处理机制及执行流程》SpringBoot内置BasicErrorController,自动处理异常并生成HTML/JSON响应,支持自定义错误路径、配置及扩展,如... 目录Spring Boot 异常处理机制详解默认错误页面功能自动异常转换机制错误属性配置选项默认错误处理

Spring Boot从main方法到内嵌Tomcat的全过程(自动化流程)

《SpringBoot从main方法到内嵌Tomcat的全过程(自动化流程)》SpringBoot启动始于main方法,创建SpringApplication实例,初始化上下文,准备环境,刷新容器并... 目录1. 入口:main方法2. SpringApplication初始化2.1 构造阶段3. 运行阶

使用Go实现文件复制的完整流程

《使用Go实现文件复制的完整流程》本案例将实现一个实用的文件操作工具:将一个文件的内容完整复制到另一个文件中,这是文件处理中的常见任务,比如配置文件备份、日志迁移、用户上传文件转存等,文中通过代码示例... 目录案例说明涉及China编程知识点示例代码代码解析示例运行练习扩展小结案例说明我们将通过标准库 os

Ubuntu 24.04启用root图形登录的操作流程

《Ubuntu24.04启用root图形登录的操作流程》Ubuntu默认禁用root账户的图形与SSH登录,这是为了安全,但在某些场景你可能需要直接用root登录GNOME桌面,本文以Ubuntu2... 目录一、前言二、准备工作三、设置 root 密码四、启用图形界面 root 登录1. 修改 GDM 配

Spring Security中用户名和密码的验证完整流程

《SpringSecurity中用户名和密码的验证完整流程》本文给大家介绍SpringSecurity中用户名和密码的验证完整流程,本文结合实例代码给大家介绍的非常详细,对大家的学习或工作具有一定... 首先创建了一个UsernamePasswordAuthenticationTChina编程oken对象,这是S

Android ViewBinding使用流程

《AndroidViewBinding使用流程》AndroidViewBinding是Jetpack组件,替代findViewById,提供类型安全、空安全和编译时检查,代码简洁且性能优化,相比Da... 目录一、核心概念二、ViewBinding优点三、使用流程1. 启用 ViewBinding (模块级

SpringBoot整合Flowable实现工作流的详细流程

《SpringBoot整合Flowable实现工作流的详细流程》Flowable是一个使用Java编写的轻量级业务流程引擎,Flowable流程引擎可用于部署BPMN2.0流程定义,创建这些流程定义的... 目录1、流程引擎介绍2、创建项目3、画流程图4、开发接口4.1 Java 类梳理4.2 查看流程图4

java Long 与long之间的转换流程

《javaLong与long之间的转换流程》Long类提供了一些方法,用于在long和其他数据类型(如String)之间进行转换,本文将详细介绍如何在Java中实现Long和long之间的转换,感... 目录概述流程步骤1:将long转换为Long对象步骤2:将Longhttp://www.cppcns.c

spring-gateway filters添加自定义过滤器实现流程分析(可插拔)

《spring-gatewayfilters添加自定义过滤器实现流程分析(可插拔)》:本文主要介绍spring-gatewayfilters添加自定义过滤器实现流程分析(可插拔),本文通过实例图... 目录需求背景需求拆解设计流程及作用域逻辑处理代码逻辑需求背景公司要求,通过公司网络代理访问的请求需要做请

使用JavaConfig配置Spring的流程步骤

《使用JavaConfig配置Spring的流程步骤》JavaConfig是Spring框架提供的一种基于Java的配置方式,它通过使用@Configuration注解标记的类来替代传统的XML配置文... 目录一、什么是 JavaConfig?1. 核心注解2. 与 XML 配置的对比二、JavaConf