当前位置:网站首页>使用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>
边栏推荐
- Write to esp8266 burning brush firmware
- 剑指Offer(二十一):栈的压入、弹出序列
- putty的使用教程
- 多目标优化系列1---NSGA2的非支配排序函数的讲解
- Anaconda is used on vscode (the environment has been configured)
- [leetcode daily question 2021/5/8]1723. The shortest time to complete all work
- 【论文下饭】Deep Mining External Imperfect Data for ChestX-ray Disease Screening
- 【机器学习小记】【搭建循环神经网络及其应用】deeplearning.ai course5 1st week programming(keras)
- RT-Thread 学习笔记(一)---配置RT-Thread开发环境
- 比较器(Comparable与Comparator接口)
猜你喜欢

【dectectron2】跟着官方demo一起做
控制随机抽中几率 [ C# | Random ]

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

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

RT-Thread 学习笔记(六)--- 开启基于SPI Flash的elmfat文件系统(上)

Write to esp8266 burning brush firmware

sigmod 函数与softmax 函数对比

putty的使用教程
![[leetcode daily question 2021/8/31] 1109. Flight reservation statistics [medium] differential array](/img/9d/5ce5d4144a9edc3891147290e360d8.png)
[leetcode daily question 2021/8/31] 1109. Flight reservation statistics [medium] differential array
![[machine learning notes] [face recognition] deeplearning ai course4 4th week programming](/img/7e/9c0e88097b90c0c24ebf86f090805b.png)
[machine learning notes] [face recognition] deeplearning ai course4 4th week programming
随机推荐
C language callback function
Inheritance method of simplified constructor (II) - class inheritance in ES6
剑指Offer(五):用两个栈实现队列
【dectectron2】跟着官方demo一起做
同步方法中不使用asyncTask<T> 修饰和await获取异步返回值(同步方法中调用异步方法)
[leetcode daily question 2021/8/30]528. Choose randomly by weight [medium]
Issue 6: which mainstream programming language should college students choose
扫雷pro版2021-08-19
STM32 Alibaba cloud mqtt esp8266 at command
Oracle创建索引
20210807#1 C语言程序结构
GIS方法类期刊和论文的综述(Introduction)怎么写?
Mlx90640 infrared thermal imager temperature sensor module development notes (VI) pseudo color coding of infrared images
如何实现临时的图形要素现实
一文详解Nodejs中fs文件模块与path路径模块
winpcap 抓包函数pcap_loop(),停止问题
kali 查看ip地址
鹏哥C语言第七节课总结
2021-08-12函数递归_和鹏哥学习C语言
[leetcode daily question 2021/4/23]368. Maximum divisible subset