flex简单参考实例
2024-08-26 13:21:27
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
.main {
position: absolute;
left: ;
top: ;
background-color: aquamarine;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: %;
height: %;
} .top {
height: 60px;
width:%;
background-color: red;
text-align:center;
} .container{
width: %;
background-color: gray;
flex: ; /**占据所有剩余空间**/
text-align:center;
display: flex;
} .left, .right{
width:100px;
background-color:green;
//flex:1;/**想要3个div均等划分就开放此设置**/
} .center{
flex:;
} .bottom {
width: %;
height: 60px;
background-color: red;
text-align:center;
}
</style>
</head>
<body>
<div class="main">
<div class="top">
top
</div> <div class="container">
<div class="left">left</div>
<div class="center">center</div>
<div class="right">right</div>
</div> <div class="bottom">footer</div>
</div>
</body>
</html>
最新文章
- 一则JVM memory leak解决的过程
- CentOS 7 为firewalld添加开放端口及相关资料
- 设置linux账号的有效时间
- 【原创】基于Memcached 实现用户登录的Demo(附源码)
- 【转】linux root用户ifconfig报command not found
- Android 中Activity生命周期分析(二):从AActivity 到BActivity过程分析
- 关于Spring的IOC和DI
- Html笔记(三)列表
- IIS与ASP.NET 通信机制深度剖析
- 解决Maven管理的项目下";Missing artifact xxx bundle";问题
- 感恩节活动中奖名单 i春秋喊你领礼物啦!
- [Swift]LeetCode551. 学生出勤纪录 I | Student Attendance Record I
- centos7环境下apache2.2.34的编译安装
- LCD调试1.0
- 网络互联技术(2)——前篇—【转载】电脑结构和CPU、内存、硬盘三者之间的关系
- ACM:油田(Oil Deposits,UVa 572)
- k8s-YAML配置文件
- linux c 编程 ------ 程序入口参数,即 main 参数
- VCL消息处理机制
- 前端_CSS