css高度已知,左右定宽,中间自适应三栏布局
2024-09-20 21:56:02
css高度已知,左右定宽,中间自适应三栏布局:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style> *{
margin: 0;
padding: 0;
} .box>div{
height: 100px;
} .box .left{
background-color: red;
width: 300px;
float: left;
} .box .right{
background-color: blue;
width: 300px;
float: right;
} .box .center{
text-align: center;
line-height: 100px;
color: #fff;
background-color: orange;
}
</style>
</head>
<body> <div class="box">
<div class="left"></div>
<div class="right"></div>
<div class="center">第一种方法:浮动</div>
</div> </body>
</html>
最新文章
- 【poj1733】 Parity game
- css font-family 字体全介绍,\5b8b\4f53 宋体 随笔
- jQuery4ajax
- Shell脚本——中继DHCP服务器自动部署
- MFC添加自定义消息
- 收集的jquery插件
- sed 入门
- SQLServer多表联查,多表分页查询
- main函数中System.exit()的作用
- https://www.cnblogs.com/zoro-robin/p/6110188.html
- Spark_RDD之RDD操作简介
- C# 多窗体之间方法调用
- UCore-Lab0
- Ubuntu18.04 Redis主从复制
- HDU 5701 中位数计数 (思维题)
- mysqldump 导出统一限制每张数据表导出的记录数
- sharepoint 2013 search configuration
- sql 两列数据交换
- some issues that you should be take care of when use the plupload module
- Codeforces Round #266 (Div. 2)