当前位置:网站首页>使用float实现左中右布局,中间内容自适应
使用float实现左中右布局,中间内容自适应
2022-07-26 10:38:00 【songywaa】
使用float实现左中右布局,一定要注意中间div的位置问题
/*css*/
.left{
float:left;
width:200px;
}
.right{
float: right;
width:200px;
}
.center{
padding: 0 200px;/*使用margin也可以*/
}
<div class="box">
<div class="left">我是左边</div>
<div class="right">我是右边</div>
<div class="center">我是中间</div>
<!-- 在html中,中间自适应的div一定要放到最后边,因为左右div浮动不占高度,如果把中间div放到前边或者中间,就会把浮动元素挤到下边去 -->
</div>
边栏推荐
- 20210807#1 C语言程序结构
- 第4期:大学生提前职业技能准备之一
- 文案秘籍七步曲至----文献团队协作管理
- Inheritance method of simplified constructor (II) - class inheritance in ES6
- Write to esp8266 burning brush firmware
- 在神州IV开发板上为STemWin 5.22加入触屏驱动
- vscode上使用anaconda(已经配置好环境)
- 鹏哥C语言20210811程序结构作业
- 同步方法中不使用asyncTask<T> 修饰和await获取异步返回值(同步方法中调用异步方法)
- Parallelism, concurrency and several directions for high concurrency optimization
猜你喜欢

在altium designer中禁用USBJATG

Mlx90640 infrared thermal imager temperature sensor module development notes (VI) pseudo color coding of infrared images

链式方法调用的事务问题剖析

Okaleido ecological core equity Oka, all in fusion mining mode

QRcode二维码(C语言)遇到的问题
![[leetcode每日一题2021/2/18]【详解】995. K 连续位的最小翻转次数](/img/de/62fca587cde95110c2a967ca93eea5.png)
[leetcode每日一题2021/2/18]【详解】995. K 连续位的最小翻转次数
![[leetcode daily question 2021/2/13]448. Find all the missing numbers in the array](/img/9b/624416fa6a408bf64ca5438273176b.png)
[leetcode daily question 2021/2/13]448. Find all the missing numbers in the array

RT-Thread 学习笔记(五)---编辑、下载、调试程序

centos8(liunx)部署WTM(ASP.NET 5)使用pgsql
![[leetcode每日一题2021/2/14]765. 情侣牵手](/img/be/8639a05c733638bf0b3fdeb11abccf.png)
[leetcode每日一题2021/2/14]765. 情侣牵手
随机推荐
[machine learning notes] [face recognition] deeplearning ai course4 4th week programming
剑指Offer(十):矩形覆盖
[paper after dinner] deep mining external perfect data for chestx ray disease screening
在神州IV开发板上成功移植STemWin V5.22
kali 查看ip地址
.net operation redis list list
GIS方法类期刊和论文的综述(Introduction)怎么写?
超图 影像 如何去除黑边(两种方法)
L2-005 set similarity (intersection of vector and set)
10 令 operator= 返回一个 reference to *this
2021-08-13和鹏哥学C语言-数组
第6期:大学生应该选择哪种主流编程语言
常见的类(了解)
RT-Thread 学习笔记(七)---开启基于SPI Flash的elmfat文件系统(中)
Navicat15 MySQL (centos7) connected to local virtual machine
剑指Offer(二十):包含min函数的栈
MD5 encryption
centos8(liunx)部署WTM(ASP.NET 5)使用pgsql
oracle 启动不了 tnslistener服务启动不了
Asynctask < T> decoration and await are not used in synchronous methods to obtain asynchronous return values (asynchronous methods are called in synchronous methods)