当前位置:网站首页>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
边栏推荐
- PHP抓取网页获取特定信息
- 腾讯汤道生:面向数实融合新世界,开发者是最重要的“建筑师”
- Tencent tangdaosheng: facing the new world of digital and real integration, developers are the most important "architects"
- Oceanwide micro fh511 single chip microcomputer IC scheme small household appliances LED lighting MCU screen printing fh511
- 新品体验:阿里云新一代本地SSD实例i4开放公测
- 移动Web实训-flex布局测试题1
- 同花顺上怎么进行开户啊, 安全吗
- 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"?
- 移动Web实训DAY-2
- How to install SSL certificates in Microsoft Exchange 2010
猜你喜欢

How to install SSL certificates in Microsoft Exchange 2010

pytorch模型

flink核心之watermarker

【MySQL从入门到精通】【高级篇】(三)MySQL用户的创建_修改_删除以及密码的设置

Google Earth engine (GEE) - Global organic soil area of FAO (1992-2018)

The Research Report of Analysys' 2022 China Banking privacy computing platform supplier strength matrix analysis' was officially launched

Scratch travel photo album Electronic Society graphical programming scratch grade examination level 1 true questions and answers analysis June 2022

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

Understand leveldb write operation

go template with... End traversal usage
随机推荐
Go语学习笔记 - gorm使用 - 数据库配置、表新增 | Web框架Gin(七)
go template with... End traversal usage
Deep understanding of Bayes theorem
Hisilicon 35xx realizes gt911 touch screen function "suggestions collection"
认识启动函数,找到用户入口
manjaro easyconnecy报错:libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
Validateur async. Vérificateur de données JS
ASP. NET CORE Study08
1015.摘花生
async-validator.js数据校验器
PHP根据年月获取月初月末时间
Why does CAD export PDF have no color
Buuctf:[wustctf2020] plain
flutter 系列之:flutter 中常用的 GridView layout 详解
证券账户开户哪家的费率低 怎么办理开户最安全
微服务稳定性保障
align-items 与 align-content 的区别
June 28, 2022 Daily: Lecun's latest paper: the road to autonomous machine intelligence
Wi-Fi 7 来啦,它到底有多强?
Flink stream processing API collection: master all Flink stream processing technologies. Just read this article





