当前位置:网站首页>Align content attribute in flex layout
Align content attribute in flex layout
2022-06-28 13:06:00 【HHppGo】
align-content Conditions under which attributes work :
- Set the free box attribute on the parent element
display:flex; - And set the arrangement mode as horizontal arrangement
flex-direction:row;( The default value is ) - Set newline ,
flex-wrap:wrap;
Demo 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>align-content attribute </title>
<style> .box {
width: 200px; display: flex; /* flex-direction: row; flex-wrap: wrap; */ flex-flow: row wrap; /* The default value is :stretch align-content: The available values are flex-start, flex-end,center,space-around,space-between,stretch */ align-content: stretch; height: 300px; background-color: grey; } .box1 {
height: 30px; width: 100px; background-color: orange; } .box2 {
height: 50px; width: 200px; background-color: red; } .box3 {
height: 30px; width: 100px; background-color: #08a9b5; } </style>
</head>
<body>
<div class="box">
<div class="box1">box1</div>
<div class="box2">box2</div>
<div class="box3">box3</div>
</div>
</body>
</html>
effect :
align-content: stretch;
align-content: flex-start;
align-content: flex-end;
align-content: center;
align-content: space-around;
align-content:space-between;
Reference article :https://blog.csdn.net/qq_40323256/article/details/102817242?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165589587016782395328090%2522%252C%2522scm%2522%253A%252220140713.130102334…%2522%257D&request_id=165589587016782395328090&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduend~default-2-102817242-null-null.142v20rank_v33,157v15new_3&utm_term=align-content&spm=1018.2226.3001.4187
边栏推荐
- 一文抄 10 篇!韩国发表的顶级会议论文被曝抄袭,第一作者是“原罪”?
- 移动Web实训-flex布局测试题1
- Vs2012 VC creates a new blank window application
- 新品体验:阿里云新一代本地SSD实例i4开放公测
- The counter attack story of Fu Jie, a young secondary school student: I spent 20 years from the second undergraduate to the ICLR outstanding Thesis Award
- Wi-Fi 7 来啦,它到底有多强?
- 基于SSM实现水果蔬菜商城管理系统
- 基础软件照搬开源不可取,自力更生才是正途
- [today in history] June 28: musk was born; Microsoft launches office 365; The inventor of Chua's circuit was born
- Electronic components distribution 1billion Club [easy to understand]
猜你喜欢

5A synchronous rectifier chip 20V to 12v2a/5v4.5a high current 24W high power synchronous rectifier chip high current step-down IC fs2462

##测试bug常用“Redmine”

Here comes Wi Fi 7. How strong is it?

从 jsonpath 和 xpath 到 SPL

Arduino-ESP32闪存文件插件程序搭建和上传

移动Web实训DAY-2

Wi-Fi 7 来啦,它到底有多强?

The white paper on the panorama of the digital economy and the digitalization of consumer finance were released

Tencent has confirmed that QQ has stolen numbers on a large scale, iphone14 has no chance of type-C, and 5g, the fourth largest operator, has officially released numbers. Today, more big news is here

电脑无线网络不显示网络列表应该如何解决
随机推荐
Here comes Wi Fi 7. How strong is it?
深入理解贝叶斯定理
k3s一键安装脚本
【MySQL从入门到精通】【高级篇】(三)MySQL用户的创建_修改_删除以及密码的设置
弹性盒子自动换行小Demo
证券账户开户哪家的费率低 怎么办理开户最安全
Après avoir échoué à l'examen d'entrée à l'Université de technologie de Harbin, vous devez rester à l'Université en tant que « chercheur » après avoir obtenu votre diplôme.
FS7022方案系列FS4059A双节两节锂电池串联充电IC和保护IC
Digital twin energy system, creating a "perspective" in the low-carbon era
pytorch模型
[cloud native] can self-service reports and Bi do so many things?
Commonly used "redmine" for # test bug
2. 01背包问题
The English translation of heartless sword Zhu Xi's two impressions of reading
Buuctf:[wustctf2020] plain
go template with... End traversal usage
STM32F1与STM32CubeIDE编程实例-矩阵键盘驱动
Flutter series part: detailed explanation of GridView layout commonly used in flutter
数字孪生能源系统,打造低碳时代“透视”眼
Which company has a low rate for opening a securities account? How to open an account is the safest





