๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ’š UIUX ์›นํผ๋ธ”๋ฆฌ์…” ๊ณผ์ •(6๊ฐœ์›”)

2021-05-26 (44์ผ์ฐจ) CSS Diner ํ—ท๊ฐˆ๋ ธ๋˜ ๊ฐœ๋… ์ •๋ฆฌํ•˜๊ธฐ

by widely design 2021. 5. 28.

154๊ฐ• - DSS Diner

 

- A + B

: ์ธ์ ‘ ํ˜•์ œ ์„ ํƒ
ex) div + a => div๋ฅผ ์ง์ ‘ ๋”ฐ๋ฅด๋Š” a (div๋™์ƒ์˜ a)

 

- a ~ b

: ์•ž์˜ ํƒœ๊ทธ๋ฅผ ๋”ฐ๋ฅด๋Š” ๋ชจ๋“  ํ˜•์ œ๋“ค ์„ ํƒ

ex) div ~ a => div์˜ ๋’ค์— ์œ„์น˜ํ•œ ๋ชจ๋“  aํ˜•์ œ

ex) a ~ a => a์˜ ๋’ค์— ์œ„์น˜ํ•œ ๋ชจ๋“   aํ˜•์ œ

a+b  ์™€  a~b

- only-child

: ์œ ์ผํ•œ ํ•˜์œ„ ์ž์‹ ์„ ํƒ
: ๋‹ค๋ฅธ ์š”์†Œ์˜ ๋‚ด๋ถ€์— ์žˆ๋Š” ์œ ์ผํ•œ ์š”์†Œ๋ฅผ ์„ ํƒํ•  ์ˆ˜ ์žˆ์Œ
span:only-child๋Š” ๋‹ค๋ฅธ ์š”์†Œ์˜ ์œ ์ผํ•œ ์ž์‹์ธ span ์š”์†Œ๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.
ex) ul li:only-child => ul ์•ˆ์— ์žˆ๋Š” ์œ ์ผํ•œ li ์„ ํƒ

ex) section > p:only-child => section ์•ˆ์— ์žˆ๋Š” ์œ ์ผํ•œ ํƒœ๊ทธ p ์„ ํƒ

ex) div:only-child => div ์•ˆ์— ์žˆ๋Š” ์œ ์ผํ•œ ํƒœ๊ทธ ์„ ํƒ

 

ใ„ด> { div > section:only-child,  section:only-child,  div : only-child } ์…‹ ์ค‘ ์–ด๋Š ํƒœ๊ทธ๋ฅผ ์„ ํƒํ•˜๋˜ ๊ฐ™์€ ๊ฒฐ๊ณผ

 

 < for >

- *[for]

  : for์ด๋ž€ ์†์„ฑ์„ ๊ฐ€์ง„ ๋ชจ๋“  ๊ฒƒ ( *๋Š” ์ƒ๋žต ๊ฐ€๋Šฅ)

 

- [for="hello]

  : for์†์„ฑ๊ฐ’ "hello"๋ฅผ ๊ฐ€์ง„ ๊ฒƒ

  ใ„ด [href="#"]์™€ ๋˜‘๊ฐ™์€ ์–‘์‹

 

- div[for]

  : div์ด๋ฉด์„œ for์†์„ฑ์„ ๊ฐ€์ง„ ๊ฒƒ

 

- [for^="he"]

  : for์†์„ฑ๊ฐ’ "he"๋กœ ์‹œ์ž‘ํ•˜๋Š” ๊ฒƒ

 

- [for*="el"]

  : for์†์„ฑ๊ฐ’ "el"๋ฅผ ํฌํ•จํ•˜๋Š” ๊ฒƒ

 

- [for$="llo"]

  : for์†์„ฑ๊ฐ’ "llo"๋กœ ๋๋‚˜๋Š” ๊ฒƒ

 

 

๋Œ“๊ธ€