当前位置:网站首页>Elastic box auto wrap demo
Elastic box auto wrap demo
2022-06-28 13:07:00 【HHppGo】
Code :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> Flex box wrap </title>
<style> * {
margin: 0; padding: 0; } .box {
/*2. Use flex Layout Arrange children horizontally Insufficient parent width Child auto scaling And the expansion will never exceed the width of the parent box Children do not wrap */ display: flex; /* 3. demand : Use Flex The layout makes the children horizontal , And the width of the parent is not enough , Child word wrap */ /* The default value is , No line wrapping */ /* flex-wrap: nowrap; */ /* Word wrap */ flex-wrap: wrap; /* 4. When using flex-wrap Give Way flex When the layout can be arranged in multiple rows , Alignment can be set between rows */ /* There is no space between lines , Vertical center */ /* align-content: center; */ /* The first and last lines are at the top and bottom of the elastic container */ align-content: space-between; height: 500px; border: 1px solid #000; } .box div {
/* 1. Use floats to arrange children horizontally Insufficient width of parent , Child word wrap */ /* float: left; */ width: 100px; height: 100px; background-color: pink; } </style>
</head>
<body>
<div class="box">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>7</div>
<div>8</div>
</div>
</body>
</html>
effect :

边栏推荐
- From jsonpath and XPath to spl
- The $980000 SaaS project failed
- Manjaro easyconnecy error: libgtk-x11-2.0 so. 0: cannot open shared object file: No such file or directory
- 同花顺上怎么进行开户啊, 安全吗
- VS2012 VC新建一个空白窗口应用
- Continuous integration practice of Baidu app based on pipeline as code
- FH511+TP4333组成一个户外移动电源照明野营灯方案。
- Fh511+tp4333 form an outdoor mobile power lighting camping lamp scheme.
- Online JSON to plaintext tool
- Centos7:切换mysql用户并登录mysql
猜你喜欢

如何在熊市中寻找机会?

Manjaro easyconnecy error: libgtk-x11-2.0 so. 0: cannot open shared object file: No such file or directory

Watermaker of the Flink core

【历史上的今天】6 月 28 日:马斯克诞生;微软推出 Office 365;蔡氏电路的发明者出生

高考失利進哈工大,畢業卻留校要當“探索者”,丁效:科研就是厚積薄發

Evaluation of IP location query interface I

高考失利进哈工大,毕业却留校要当“探索者”,丁效:科研就是厚积薄发

腾讯汤道生:面向数实融合新世界,开发者是最重要的“建筑师”

Centos6.5 php+mysql MySQL library not found

4年用户数破亿,孙哥带领波场再创新高
随机推荐
Embedded development: seven techniques for estimating battery life
4年用户数破亿,孙哥带领波场再创新高
数字孪生能源系统,打造低碳时代“透视”眼
June 28, 2022 Daily: Lecun's latest paper: the road to autonomous machine intelligence
深入理解贝叶斯定理
MySQ 8.0 推出直方图,性能大大提升!
scratch旅行相册 电子学会图形化编程scratch等级考试一级真题和答案解析2022年6月
Fastposter v2.8.4 release e-commerce poster generator
Copy 10 for one article! The top conference papers published in South Korea were exposed to be plagiarized, and the first author was "original sin"?
Mature case and source code of hash quiz game system development technology
mysql数据库扫盲,你真的知道什么是数据库嘛
pytorch基础
一文抄 10 篇!韩国发表的顶级会议论文被曝抄袭,第一作者是“原罪”?
async-validator.js数据校验器
How to display the server list of the electric donkey, and how to update the eMule server list
Hisilicon 35xx realizes gt911 touch screen function "suggestions collection"
海思35xx实现GT911触摸屏功能「建议收藏」
Google Earth Engine(GEE)——联合国粮农组织全球有机土壤面积(1992-2018年度)
pytorch模型调参、训练相关内容
Arduino-ESP32闪存文件插件程序搭建和上传