300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > 实现一个三列布局(左右侧固定 中间自适应宽度) – jimmie.Mr

实现一个三列布局(左右侧固定 中间自适应宽度) – jimmie.Mr

时间:2023-04-18 17:05:40

相关推荐

实现一个三列布局(左右侧固定 中间自适应宽度) – jimmie.Mr

web前端|html教程

实现一个三列布局(左右侧固定,中间自适应宽度) – jimmie.Mr

web前端-html教程

html代码(第一二种方法):

网狐手机源码,如何用vscode搭建码云,pdf 声音 Ubuntu,tomcat基础介绍视频,夏天小黑爬虫,php开发手机应用,沧州seo搜索优化多少钱,aspcms 网站统计lzw

左侧固定区

右侧固定区

中间自适应区

css代码:

手机淘宝号查询网站源码,卸载win装ubuntu,tomcat域名端口映射,爬虫之路python,php 芝麻认证,广州白云专业的seo优化哪里有lzw

第一种方法(定位):

ssm项目源码,ubuntu默认系统更改,明日科技python爬虫,stmt php,云南seo咨询lzw

.left { position: absolute; top: 0; left: 0; width: 100px; height: 200px; background-color: red; } .mid { margin-left: 100px; margin-right: 200px; height: 200px; background-color: blue; } .right { position: absolute; top: 0; right: 0; width: 200px; height: 200px; background-color: yellow; }

第二种方法(浮动):

.left { float: left; width: 100px; height: 200px; background-color: red;}.mid { height: 200px; background-color: blue;}.right { float: right; width: 200px; height: 200px; background-color: yellow;}

第三种方法(负边距):

html代码:

中间自适应区中间自适应区中间自适应区中间自适应区中间自适应区中间自适应区中间自适应区中间自适应区中间自适应区中间自适应区中间自适应区中间自适应区

左边固定区

右边固定区

css代码:

.fl { float: left; }.center { width: 100%; height: 200px; background: yellow;} .center .mid{ margin-right: 100px; padding: 0 110px; }.left{ margin-left: -100%; width: 100px; height: 200px; background: green;}.right{ margin-left: -200px; width: 200px; height: 200px; background: blue;}

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。