๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๐Ÿ’ป/Front-end

CSS - display: flex

๋ถ€๋ชจ ์š”์†Œ์ธ Flex Container์™€ ์ž์‹ ์š”์†Œ์ธ Flex Item

Flxe ๊ธฐ๋Šฅ์˜ ์˜ํ–ฅ์„ ๋ฐ›๋Š” ์ „์ฒด ๊ณต๊ฐ„์€ ๋ถ€๋ชจ ์š”์†Œ์ธ Container

์„ค์ •๋œ Flex ์†์„ฑ์— ๋”ฐ๋ผ Container ์† ์ž์‹ ์š”์†Œ์ธ Item๋“ค์ด ์—ฌ๋Ÿฌ ํ˜•ํƒœ๋กœ ๋ฐฐ์น˜

 

 

* ๋ฐฐ์น˜ ๋ฐฉํ–ฅ ์†์„ฑ _ flex-direction

.container {
	flex-direction: row;
	/* flex-direction: column; */
	/* flex-direction: row-reverse; */
	/* flex-direction: column-reverse; */
}

 

 

* ์ •๋ ฌ ์†์„ฑ

๋ฉ”์ธ์ถ• ๋ฐฉํ–ฅ ์„ค์ • 

justify-content

.container {
	justify-content: center;
   	/* justify-content: flex-start; */
	/* justify-content: flex-end; */
	/* justify-content: space-between; */
	/* justify-content: space-around; */
	/* justify-content: space-evenly; */
}

 

์ˆ˜์ง์ถ• ๋ฐฉํ–ฅ ์„ค์ •

align-items

.container {
	align-items: center;
	/* align-items: flex-start; */
	/* align-items: flex-end; */
	/* align-items: stretch; */
	/* align-items: baseline; */
}

align-items: stretch;
align-items: baseline;

 

 

 

 

์ถœ์ฒ˜ https://studiomeal.com/archives/197

'๐Ÿ’ป > Front-end' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

Simple Diary - (1) ์ค‘๋ณต ์ œ๊ฑฐ (state, onChange ํ•ฉ์น˜๊ธฐ)  (0) 2023.01.02
React - State์™€ Props  (0) 2022.03.28