μ΄λ²μλ dimensionμ λν΄μ ν¬μ€ν μ ν΄λ³΄λλ‘ νκ² μ΅λλ€. μ¬κΈ°μ λ§νλ λλ©μ μ΄λ 3μ°¨μ 4μ°¨μ μ΄λ° κ²μ λ§νλ κ²μ΄ μλκ³ μ...λ¨μ§ λλΉμ λμ΄λ₯Ό λ€λ£¨λ κ²μ λ§ν©λλ€.
컨ν νΈκ° λ€μ΄κ°λ λ°μ€μ λλ©μ κ³Ό κ΄λ ¨λ μμ±λ€μλ λ€μκ³Ό κ°μ κ²λ€μ΄ μμ΅λλ€.
height λ°μ€μ λμ΄λ₯Ό κ²°μ μ§λ μμ±μ λλ€.
width λ°μ€μ λλΉλ₯Ό μ§μ νλ μμ±μ΄μ£ .
line-height κΈμ λΌμΈμ λμ΄λ₯Ό μ§μ ν©λλ€.
max-height λ°μ€μ μ΅λ λμ΄λ₯Ό μ νν©λλ€.
min-height λ°μ€μ μ΅μ λμ΄λ₯Ό μ νν©λλ€.
max-width λ°μ€μ μ΅λ λλΉλ₯Ό μ ν.
min-width λ°μ€μ μ΅μ λλΉλ₯Ό μ ν.
The height and width Properties:
The height and width properties allow you to set the height and width for boxes. They can take values of a length, a percentage, or the keyword auto.
λ€μ μμ λ₯Ό 보μμ£ .
<p style="width:400px; height:100px;border:1px solid red; padding:5px; margin:10px;"> This paragraph is 400pixels wide and 100 pixels high </p> |
κ²°κ³Όλ μλμ κ°μ΅λλ€.
This paragraph is 400pixels wide and 100 pixels high |
The line-height Property:
The line-height property allows you to increase the space between lines of text. The value of the line-height property can be a number, a length, or a percentage.
λ€μ μμ λ₯Ό 보μμ£ .
<p style="width:400px; height:100px;border:1px solid red; padding:5px; margin:10px;line-height:30px;"> This paragraph is 400pixels wide and 100 pixels high and here line height is 30pixels.This paragraph is 400 pixels wide and 100 pixels high and here line height is 30pixels. </p> |
κ²°κ³Όλ μλμ κ°μ΅λλ€.
This paragraph is 400pixels wide and 100 pixels high and here line height is 30pixels.This paragraph is 400 pixels wide and 100 pixels high and here line height is 30pixels. |
The max-height Property:
The max-height property allows you to specify maximum height of a box. The value of the max-height property can be a number, a length, or a percentage.
NOTE: This property does not work in either Netscape 7 or IE 6.
λ€μ μμ λ₯Ό 보μμ£ .
<p style="width:400px; max-height:10px;border:1px solid red; padding:5px; margin:10px;"> This paragraph is 400px wide and max height is 10px This paragraph is 400px wide and max height is 10px This paragraph is 400px wide and max height is 10px This paragraph is 400px wide and max height is 10px </p> <img alt="logo" src="/images/css.gif" width="95" height="84" /> |
κ²°κ³Όλ μλμ κ°μ΅λλ€.
This paragraph is 400px wide and max height is 10px This paragraph is 400px wide and max height is 10px This paragraph is 400px wide and max height is 10px This paragraph is 400px wide and max height is 10px |
The min-height Property:
The min-height property allows you to specify minimum height of a box. The value of the min-height property can be a number, a length, or a percentage.
NOTE: This property does not work in either Netscape 7 or IE 6.
λ€μ μμ λ₯Ό 보μμ£ .
<p style="width:400px; min-height:200px;border:1px solid red; padding:5px; margin:10px;"> This paragraph is 400px wide and min height is 200px This paragraph is 400px wide and min height is 200px This paragraph is 400px wide and min height is 200px This paragraph is 400px wide and min height is 200px </p> <img alt="logo" src="/images/css.gif" width="95" height="84" /> |
κ²°κ³Όλ μλμ κ°μ΅λλ€.
This paragraph is 400px wide and min height is 200px This paragraph is 400px wide and min height is 200px This paragraph is 400px wide and min height is 200px This paragraph is 400px wide and min height is 200px |
The max-width Property:
The max-width property allows you to specify maximum width of a box. The value of the max-width property can be a number, a length, or a percentage.
NOTE: This property does not work in either Netscape 7 or IE 6.
λ€μ μμ λ₯Ό 보μμ£ .
<p style="max-width:100px; height:200px;border:1px solid red; padding:5px; margin:10px;"> This paragraph is 200px high and max width is 100px This paragraph is 200px high and max width is 100px This paragraph is 200px high and max width is 100px This paragraph is 200px high and max width is 100px This paragraph is 200px high and max width is 100px </p> <img alt="logo" src="/images/css.gif" width="95" height="84" /> |
κ²°κ³Όλ μλμ κ°μ΅λλ€.
This paragraph is 200px high and max width is 100px This paragraph is 200px high and max width is 100px This paragraph is 200px high and max width is 100px This paragraph is 200px high and max width is 100px This paragraph is 200px high and max width is 100px |
The min-width Property:
The min-width property allows you to specify minimum width of a box. The value of the min-width property can be a number, a length, or a percentage.
NOTE: This property does not work in either Netscape 7 or IE 6.
λ€μ μμ λ₯Ό 보μμ£ .
<p style="min-width:400px; height:100px;border:1px solid red; padding:5px; margin:10px;"> This paragraph is 100px high and min width is 400px This paragraph is 100px high and min width is 400px This paragraph is 100px high and min width is 400px This paragraph is 100px high and min width is 400px This paragraph is 100px high and min width is 400px </p> <img alt="logo" src="/images/css.gif" width="95" height="84" /> |
κ²°κ³Όλ μλμ κ°μ΅λλ€.
This paragraph is 100px high and min width is 400px This paragraph is 100px high and min width is 400px This paragraph is 100px high and min width is 400px This paragraph is 100px high and min width is 400px This paragraph is 100px high and min width is 400px |
κΌ λ°λΌν΄ 보μλ κ² μμ§ λ§μκ³ , μ΄κ²μ κ² μμΉλ λ°κΏμ ν΄λ³΄μΈμ. ^-^
Reference : http://www.tutorialspoint.com/css/css_dimension.htm
'π» Programming > CSS' μΉ΄ν κ³ λ¦¬μ λ€λ₯Έ κΈ
[CSS] 20. Visibility ( κ°μμ± ) (0) | 2016.06.12 |
---|---|
[CSS] 19. Scrollbars ( μ€ν¬λ‘€λ° ) (0) | 2016.06.12 |
[CSS] 17. Outlines ( μΈκ³½μ , μμλΌμΈ ) (0) | 2016.06.12 |
[CSS] 16. Cursor ( λ§μ°μ€ 컀μ λͺ¨μ ) (0) | 2016.06.12 |
[CSS] 15. Paddings ( ν¨λ© ) (0) | 2016.06.12 |