๐Ÿ’ป Programming/CSS (28)

์ด๋ฒˆ์—๋Š” CSS ์†์„ฑ์„ ์ด์šฉํ•ด์„œ ํ…์ŠคํŠธ๋ฅผ ์กฐ์ž‘ํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด์„œ ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

  • The color property is used to set the color of a text.

  • The direction property is used to set the text direction.

  • The letter-spacing property is used to add or subtract space between the letters that make up a word.

  • The word-spacing property is used to add or subtract space between the words of a sentence.

  • The text-indent property is used to indent the text of a paragraph.

  • The text-align property is used to align the text of a document.

  • The text-decoration property is used to underline, overline, and strikethrough text.

  • The text-transform property is used to capitalize text or convert text to uppercase or lowercase letters.

  • The white-space property is used to control the flow and formatting of text.

  • The text-shadow property is used to set the text shadow around a text.

 

ํ…์ŠคํŠธ ์ƒ‰๊น” ์„ค์ •

<p style="color:red;">
This text will be written in red.
</p>

๊ฒฐ๊ณผ๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค.

This text will be written in red.

 

 

ํ…์ŠคํŠธ ๋ฐฉํ–ฅ ์„ค์ •

Following is the example which demonstrates how to set the direction of a text. Possible values are ltr or rtl.

<p style="direction:rtl;">
This text will be renedered from right to left
</p>

๊ฒฐ๊ณผ๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค.

This text will be renedered from right to left

 

 

๋ฌธ์ž ์‚ฌ์ด์˜ ๊ณต๊ฐ„ ์„ค์ •

Following is the example which demonstrates how to set the space between characters. Possible values are normal or a number specifying space..

<p style="letter-spacing:5px;">
This text is having space between letters.
</p>

๊ฒฐ๊ณผ๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค.

This text is having space between letters.

 

 

๋‹จ์–ด ์‚ฌ์ด์˜ ๊ณต๊ฐ„ ์„ค์ •

Following is the example which demonstrates how to set the space between words. Possible values are normal or a number specifying space..

<p style="word-spacing:5px;">
This text is having space between words.
</p>

๊ฒฐ๊ณผ๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค.

This text is having space between words.

 

 

ํ…์ŠคํŠธ ์ธ๋ดํŠธ ์„ค์ •

Following is the example which demonstrates how to indent the first line of a paragraph. Possible values are % or a number specifying indent space..

<p style="text-indent:1cm;">
This text will have first line indented by 1cm
and this line will remain at its actual position
this is done by CSS text-indent property.
</p>

๊ฒฐ๊ณผ๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค.

This text will have first line indented by 1cm
and this line will remain at its actual position
this is done by CSS text-indent property.

 

 

ํ…์ŠคํŠธ ์ •๋ ฌ ์„ค์ •

Following is the example which demonstrates how to align a text. Possible values are left, right, center, justify..

<p style="text-align:right;">
This will be right aligned.
</p>
<p style="text-align:center;">
This will be center aligned.
</p>
<p style="text-align:left;">
This will be left aligned.
</p>

๊ฒฐ๊ณผ๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค.

This will be right aligned.

This will be center aligned.

This will be left aligned.

 

 

ํ…์ŠคํŠธ ๊พธ๋ฐˆ ์„ค์ •

Following is the example which demonstrates how to decorate a text. Possible values are none, underline, overline, line-through, blink..

<p style="text-decoration:underline;">
This will be underlined
</p>
<p style="text-decoration:line-through;">
This will be striked through.
</p>
<p style="text-decoration:overline;">
This will have a over line.
</p>
<p style="text-decoration:blink;">
This text will have blinking effect
</p>

๊ฒฐ๊ณผ๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค.

This will be underlined

This will be striked through.

This will have a over line.

This text will have blinking effect

 

 

ํ…์ŠคํŠธ ๋Œ€์†Œ๋ฌธ์ž ์„ค์ •

Following is the example which demonstrates how to set the cases for a text. Possible values are none, capitalize, uppercase, lowercase..

<p style="text-transform:capitalize;">
This will be capitalized
</p>
<p style="text-transform:uppercase;">
This will be in uppercase
</p>
<p style="text-transform:lowercase;">
This will be in lowercase
</p>

๊ฒฐ๊ณผ๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค.

This will be capitalized

This will be in uppercase

This will be in lowercase

 

 

ํ…์ŠคํŠธ white-space ์„ค์ •

Following is the example which demonstrates how white space inside an element is handled. Possible values are normal, pre, nowrap.

<p style="white-space:pre;">This text has a line break
and the white-space pre setting tells the browser to honor it
just like the HTML pre tag.</p>

๊ฒฐ๊ณผ๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค. 

This text has a line break and the white-space pre setting tells the browser to honor it just like the HTML pre tag.

 

 

ํ…์ŠคํŠธ ๊ทธ๋ฆผ์ž ์„ค์ •

Following is the example which demonstrates how to set the shadow around a text. This may not be supported by all the browsers.

<p style="text-shadow:4px 4px 8px blue;">
If your browser supports the CSS text-shadow property, 
this text will have a  blue shadow.</p>

๊ฒฐ๊ณผ๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค.

If your browser supports the CSS text-shadow property, this text will have a blue shadow.

 

 

 

 

Reference : http://www.tutorialspoint.com/css/css_text.htm

 

 

 

 

์ด๋ฒˆ ํฌ์ŠคํŒ…์—์„œ๋Š” CSS๋ฅผ ์ด์šฉํ•ด์„œ ํฐํŠธ๋ฅผ ์„ค์ •ํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด์„œ ์•Œ์•„๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

  • font-family ๋Š” ํฐํŠธ๋ฅผ ๋ณ€๊ฒฝํ•˜๋Š” ์†์„ฑ์ž…๋‹ˆ๋‹ค. ( ๋‹์›€์ฒด, ๊ตด๋ฆผ์ฒด ๋ญ ์ด๋Ÿฐ๊ฒƒ๋“ค ์žˆ์ฃ ? ) 

  • font-style ๋Š” ํฐํŠธ๋ฅผ ์ฒด๋ฅผ ๋ณ€๊ฒฝํ•˜๋Š” ์†์„ฑ์ž…๋‹ˆ๋‹ค. ( italic, oblique ) 

  • font-variant ๋Š” ๋Œ€์†Œ๋ฌธ์ž๋ฅผ ์„ค์ •ํ•˜๋Š” ์†์„ฑ์ž…๋‹ˆ๋‹ค.

  • font-weight ๋Š” ํฐํŠธ์˜ ๊ตต๊ธฐ๋ฅผ ์„ค์ •ํ•˜๋Š” ์†์„ฑ์ž…๋‹ˆ๋‹ค. ( bold, light ) 

  • font-size ๋Š” ํฐํŠธ ์‚ฌ์ด์ฆˆ๋ฅผ ์„ค์ •ํ•˜๋Š” ์†์„ฑ์ž…๋‹ˆ๋‹ค.

  • font ๋Š” ํฐํŠธ๊ด€๋ จ ๋ชจ๋“  ์†์„ฑ์„ ํ•œ๋ฒˆ์— ์„ค์ •ํ•  ์ˆ˜ ์žˆ๋Š” ํ•œ๋ฐฉ ์†์„ฑ์ž…๋‹ˆ๋‹ค.

 

ํฐํŠธ ํŒจ๋ฐ€๋ฆฌ ์„ค์ •ํ•˜๊ธฐ

์„ค์ • ๊ฐ€๋Šฅํ•œ ๊ฐ’์€ ๋ชจ๋“  ํฐํŠธ ํŒจ๋ฐ€๋ฆฌ ๊ฐ’์ž…๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ๋“ค๋ฉด aria, serif์™€ ๊ฐ™์€ ํฐํŠธ ์„œ์ฒด์ž…๋‹ˆ๋‹ค.  

<p style="font-family:georgia,garamond,serif;">
This text is rendered in either georgia, garamond, or the default
serif font depending on which font  you have at your system.
</p>

๊ฒฐ๊ณผ๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค.

This text is rendered in either georgia, garamond, or the default
serif font depending on which font you have at your system.

 

 

ํฐํŠธ ์Šคํƒ€์ผ ์„ค์ •ํ•˜๊ธฐ

์„ค์ • ๊ฐ€๋Šฅํ•œ ๊ฐ’์€ normal, italic ๊ทธ๋ฆฌ๊ณ  oblique ์ž…๋‹ˆ๋‹ค. 

<p style="font-style:italic;">
This text will be rendered in italic style
</p>

๊ฒฐ๊ณผ๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค.

This text will be rendered in italic style

 

 

ํฐํŠธ ๋ณ€์ข… ์„ค์ •ํ•˜๊ธฐ

๊ฐ€๋Šฅํ•œ ๊ฐ’์€ normal ๊ณผ small-caps๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

<p style="font-variant:small-caps;">
This text will be rendered as small caps
</p>

๊ฒฐ๊ณผ๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค.

This text will be renedered as small caps

 

 

ํฐํŠธ ๋‘๊ป˜ ์„ค์ •ํ•˜๊ธฐ

ํฐํŠธ์˜ ๋‘๊ป˜๋ฅผ ์„ค์ •ํ•˜๋Š” ์†์„ฑ์ž…๋‹ˆ๋‹ค.

๊ฐ€๋Šฅํ•œ ๊ฐ’์€ normal, bold, bolder, lighter, 100, 200, 300, 400, 500, 600, 700, 800, 900 ์ด ์žˆ์Šต๋‹ˆ๋‹ค.

<p style="font-weight:bold;">
This font is bold.
</p>
<p style="font-weight:bolder;">
This font is bolder.
</p>
<p style="font-weight:900;">
This font is 900 weight.
</p>

๊ฒฐ๊ณผ๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค.

This font is bold.

This font is bolder.

This font is 900 weight.

 

 

ํฐํŠธ ์‚ฌ์ด์ฆˆ ์„ค์ •ํ•˜๊ธฐ

๊ฐ€๋Šฅํ•œ ๊ฐ’์€ xx-small, x-small, small, medium, large, x-large, xx-large, smaller, larger, ๊ทธ๋ฆฌ๊ณ  ํ”ฝ์…€๊ฐ’ ๋˜๋Š” ํผ์„ผํŠธ ๊ฐ’์ž…๋‹ˆ๋‹ค.

<p style="font-size:20px;">
This font size is 20 pixels
</p>
<p style="font-size:10pt;">
This font size is small
</p>
<p style="font-size:14pt;">
This font size is large
</p>

๊ฒฐ๊ณผ๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค. 

This font size is 20 pixels

This font size is small

This font size is large

 

 

ํฐํŠธ ์‚ฌ์ด์ฆˆ adjust ์„ค์ •ํ•˜๊ธฐ

์ด๋ฒˆ์—๋Š” ํฐํŠธ์˜ ์‚ฌ์ด์ฆˆ adjust ์„ค์ •์„ ํ•˜๋Š” ๊ฒƒ์ด๋„ค์š”. ๊ฐ€๋Šฅํ•œ ๊ฐ’์€ ๋ชจ๋“  ์ˆซ์ž๊ฐ’์ž…๋‹ˆ๋‹ค.  

<p style="font-size-adjust:0.61;">
This text is using a font-size-adjust value.
</p>

๊ฒฐ๊ณผ๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค.

This text is using a font-size-adjust value.

 

 

ํฐํŠธ ์ŠคํŠธ๋ ˆ์น˜ ์„ค์ •

๊ฐ€๋Šฅํ•œ ๊ฐ’์€ normal, wider, narrower, ultra-condensed, extra-condensed, condensed, semi-condensed, semi-expanded, expanded, extra-expanded, ultra-expanded ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ์†์„ฑ์€ ์—ฌ๋Ÿฌ๋ถ„ ์ปดํ“จํ„ฐ์— ์žˆ๋Š” ํฐํŠธ๊ฐ€ 

<p style="font-stretch:ultra-expanded;">
If this doesn't appear to work, it is likely that 
your computer doesn't have a condensed or expanded 
version of the font being used.
</p>

๊ฒฐ๊ณผ๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค.

If this doesn't appear to work, it is likely that your computer doesn't have a condensed or expanded version of the font being used.

 

 

ํฐํŠธ ์†์„ฑ ํ•œ๋ฒˆ์— ์„ค์ •ํ•˜๊ธฐ

<p style="font:italic small-caps bold 15px georgia;">
Applying all the properties on the text at once.
</p>

๊ฒฐ๊ณผ๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค

Applying all the properties on the text at once.

 

 

 

 

์ด์ƒ์œผ๋กœ ํฐํŠธ ๊ด€๋ จ ์†์„ฑ๋“ค์— ๋Œ€ํ•ด์„œ ์•Œ์•„๋ณด์•˜์Šต๋‹ˆ๋‹ค.

 

ํœด์šฐ~~~ ์Šฌ์Šฌ CSS๊ฐ€ ์žฌ๋ฏธ์žˆ์–ด ์ง€์‹œ๋‚˜์š”? ์ง€๊ฒจ์›Œ์ง€์‹œ๋‚˜์š”?

 

์ด์ œ ์‹œ์ž‘์ธ๋ฐ ๋ง์ด์ฃ  ใ…‹ใ…‹ใ…‹

 

ํ™”์ดํŒ…์ž…๋‹ˆ๋‹ค~~ 

 

 

 

 

 

 

Reference : http://www.tutorialspoint.com/css/css_fonts.htm 

 

 

 

 

 

์ด๋ฒˆ ํฌ์ŠคํŒ…์—์„œ๋Š” ๊ฐ์ข… HTML ํƒœ๊ทธ๋‚ด์—์„œ ์“ฐ์ด๋Š” ๋ฐฐ๊ฒฝ ๊ด€๋ จ ์†์„ฑ์— ๋Œ€ํ•ด์„œ ์•Œ์•„๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. ๋ฐฐ๊ฒฝ๊ด€๋ จ ์†์„ฑ์—๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๊ฒƒ๋“ค์ด ์žˆ์Šต๋‹ˆ๋‹ค.

  •  background-color ๋Š” ๋ฐฐ๊ฒฝ ์ƒ‰์ƒ์„ ์„ค์ •ํ•˜๊ธฐ ์œ„ํ•œ ์†์„ฑ์ž…๋‹ˆ๋‹ค.

  •  background-image ๋Š” ๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง€๋ฅผ ์„ค์ •ํ•˜๊ธฐ ์œ„ํ•œ ์†์„ฑ์ž…๋‹ˆ๋‹ค.

  •  background-repeat ๋Š” ๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง€์˜ ๋ฐ˜๋ณต ์—ฌ๋ถ€๋ฅผ ์„ค์ •ํ•˜๊ธฐ ์œ„ํ•œ ์†์„ฑ์ž…๋‹ˆ๋‹ค.

  •  background-position ๋Š” ๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง€์˜ ์œ„์น˜๋ฅผ ์„ค์ •ํ•˜๊ธฐ ์œ„ํ•œ ์†์„ฑ์ž…๋‹ˆ๋‹ค.

  •  background-attachment ๋Š” ๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง€์˜ ์Šคํฌ๋กค๋ง์„ ์„ค์ •ํ•˜๊ธฐ ์œ„ํ•œ ์†์„ฑ์ž…๋‹ˆ๋‹ค.

  •  background property is used as shorthand to specify a number of other background properties.

 

๋ฐฐ๊ฒฝ ์ƒ‰ ์„ค์ •ํ•˜๊ธฐ

<p style="background-color:yellow;">
This text has a yellow background color.
</p>

This will produce following result:

This text has a yellow background color.

 

 

 

๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง€ ์„ค์ •ํ•˜๊ธฐ

<table style="background-image:url(/images/pattern1.gif);">
<tr><td>
This table has background image set.
</td></tr>
</table>

 

 

๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง€ ๋ฐ˜๋ณตํ•˜๊ธฐ

<table style="background-image:url(/images/pattern1.gif); 
              background-repeat: repeat;">
<tr><td>
This table has background image which repeats multiple times.
</td></tr>
</table>

 

์•„๋ž˜ ์˜ˆ์ œ๋Š” ๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง€๋ฅผ ์„ธ๋กœ๋กœ ๋ฐ˜๋ณต์‹œํ‚ค๋Š” ์˜ˆ์ œ์ž…๋‹ˆ๋‹ค.

<table style="background-image:url(/images/pattern1.gif); 
              background-repeat: repeat-y;">
<tr><td>
This table has background image set which will repeat vertically.
</td></tr>
</table>

 

์•„๋ž˜๋Š” ๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง€๋ฅผ ๊ฐ€๋กœ๋กœ ๋ฐ˜๋ณต์‹œํ‚ค๋Š” ์˜ˆ์ œ์ž…๋‹ˆ๋‹ค.

<table style="background-image:url(/images/pattern1.gif); 
              background-repeat: repeat-x;">
<tr><td>
This table has background image set which will repeat horizontally.
</td></tr>
</table>

 

 

๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง€ ์œ„์น˜ ์„ค์ •ํ•˜๊ธฐ

๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง€๋ฅผ ์™ผ์ชฝ์—์„œ 100 ํ”ฝ์…€ ๋–จ์–ด๋œจ๋ ค์„œ ์œ„์น˜์‹œํ‚ค๋Š” ์˜ˆ์ œ์ž…๋‹ˆ๋‹ค. 

<table style="background-image:url(/images/pattern1.gif); 
              background-position:100px;">
<tr><td>
Background image positioned 100 pixels away from the left.
</td></tr>
</table>

๋‹ค์œผ๋ฏ€ ์˜ˆ์ œ๋Š” ๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง€์˜ ์œ„์น˜๋ฅผ ์™ผ์ชฝ์—์„œ 100 ํ”ฝ์…€ ๊ทธ๋ฆฌ๊ณ  ์œ„์—์„œ 200 ํ”ฝ์…€ ๋–จ์–ด์ง„ ๊ณณ์— ์œ„์น˜์‹œํ‚ค๋Š” ์˜ˆ์ œ์ž…๋‹ˆ๋‹ค.

<table style="background-image:url(/images/pattern1.gif); 
              background-position:100px 200px;">
<tr><td>
This table has background image positioned 100
pixels away from the left and 200 pixels from the top.
</td></tr>
</table>

 

 

๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง€ ๊ณ ์ • ๋˜๋Š” ์Šคํฌ๋กค ์—ฌ๋ถ€ ์„ค์ •ํ•˜๊ธฐ

Background attachment determines whether a background image is fixed or scrolls with the rest of the page.

 

์•„๋ž˜ ์˜ˆ์ œ๋Š” ๋ฐฐ๊ฒฝ์ด๋ฏธ์ง€๋ฅผ ๊ณ ์ •์‹œํ‚ค๋Š” ์˜ˆ์ œ์ž…๋‹ˆ๋‹ค. 

<p style="background-image:url(/images/pattern1.gif); 
              background-attachment:fixed;">
This parapgraph has fixed background image.
</p>

์ด๋ฒˆ ์˜ˆ์ œ๋Š” ์Šคํฌ๋กค๋ง์„ ํ•ด์ฃผ๋Š” ์˜ˆ์ œ๋„ค์š”.

<p style="background-image:url(/images/pattern1.gif); 
              background-attachment:scroll;">
This parapgraph has scrolling background image.
</p>

 

 

๋ฐฐ๊ฒฝ ์†์„ฑ ํ•œ๊บผ๋ฒˆ์— ์„ค์ •ํ•˜๊ธฐ

background ์†์„ฑ์€ ์—ฌ๋Ÿฌ๊ฐœ์˜ ๋ฐฐ๊ฒฝ๊ด€๋ จ ์†์„ฑ์„ ํ•œ๊บผ๋ฒˆ์— ์„ค์ •ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•ด์ค๋‹ˆ๋‹ค. 

<p style="background:url(/images/pattern1.gif) repeat fixed;">
This parapgraph has fixed repeated background image.
</p>

 

 

 

 

 

Reference : http://www.tutorialspoint.com/css/css_backgrounds.htm 

 

 

 

 

 

 

 

 

๐Ÿ’ป Programming/CSS

[CSS] 5. Colors ( ์ƒ‰๊น” )

 

CSS ์—์„œ ์ƒ‰๊น”์„ ์ง€์ •ํ•˜๋Š” ๋ฐฉ๋ฒ•์€ ์•„๋ž˜์ฒ˜๋Ÿผ 5๊ฐ€์ง€ ๋ฐฉ๋ฒ•์ด ์žˆ์Šต๋‹ˆ๋‹ค

FormatSyntaxExample
Hex Code#RRGGBBp{color:#FF0000;}
Short Hex Code#RGBp{color:#6A7;}
RGB %rgb(rrr%,ggg%,bbb%)p{color:rgb(50%,50%,50%);}
RGB Absolutergb(rrr,ggg,bbb)p{color:rgb(0,0,255);}
keywordaqua, black, etc.p{color:teal;}

 

์•„๋ž˜์—์„œ ์ข€ ๋” ์ž์„ธํžˆ ์•Œ์•„๋ณด๋„๋ก ํ•˜์ฃ . 


1. CSS Colors - Hex Codes ( 16์ง„์ˆ˜ RRGGBB ์ฝ”๋“œ )

16์ง„์ˆ˜ ์ฝ”๋“œ๋กœ ํ‘œํ˜„ํ•  ๋•Œ๋Š” # ๊ธฐํ˜ธ๋ฅผ ๋จผ์ € ๋ถ™์—ฌ์ฃผ๊ณ  6์ž๋ฆฌ์˜ RRGGBB ์ฝ”๋“œ๋ฅผ ๋„ฃ์–ด์ฃผ๋ฉด ๋ฉ๋‹ˆ๋‹ค. RGB์˜ R์€ ๋นจ๊ฐ•, G๋Š” ์ดˆ๋ก, B๋Š” ํŒŒ๋ž‘์ž…๋‹ˆ๋‹ค. RR์ด๋ผ๋Š” ๊ฒƒ์€ ๋นจ๊ฐ•์„ ๋‚˜ํƒ€๋‚ด๋Š” 16์ง„์ˆ˜ ์ˆซ์ž๋ฅผ ๋งํ•ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค๋ฉด 00๋ถ€ํ„ฐ FF๊นŒ์ง€์˜ ๊ฐ’์ด ๋ฉ๋‹ˆ๋‹ค. GG์™€ BB์—ญ์‹œ ๋งˆ์ฐฌ๊ฐ€์ง€์ž…๋‹ˆ๋‹ค.

์•„๋ž˜๋Š” ์ด๋ ‡๊ฒŒ 16์ง„์ˆ˜๋ฅผ ์ด์šฉํ•ด์„œ ์ƒ‰๊น”์„ ํ‘œ์‹œํ–ˆ์„ ๋•Œ ์–ด๋–ป๊ฒŒ ํ™”๋ฉด์— ๋ณด์—ฌ์ง€๋Š”์ง€๋ฅผ ๋ณด์—ฌ์ฃผ๋Š” ํ‘œ์ž…๋‹ˆ๋‹ค.


ColorColor HEX
 #000000
 #FF0000
 #00FF00
 #0000FF
 #FFFF00
 #00FFFF
 #FF00FF
 #C0C0C0
 #FFFFFF

 

 

CSS Colors - Short Hex Codes ( 16์ง„์ˆ˜ RGB ์ฝ”๋“œ )

์ด๋ฒˆ์—๋Š” ์ข€ ์งง๊ฒŒ ์“ฐ๋Š” RGB์ฝ”๋“œ์ž…๋‹ˆ๋‹ค. ์œ„์—์„œ RRGGBB๋กœ ์“ฐ์˜€๋˜ ๊ฒƒ์ด RGB๋กœ ์ค„์–ด๋“  ๊ฒƒ์ด์ฃ . ๋‹ค๋ฅธ ์ ์€ ์œ„ ์—ฌ์„ฏ์ž๋ฆฌ RRGGBB์ฝ”๋“œ์—์„œ๋Š” ์ข€ ๋” ์„ธ๋ฐ€ํ•˜๊ฒŒ ์ƒ‰๊น”์„ ์ง€์ •ํ•  ์ˆ˜ ์žˆ๋Š” ๋ฐ˜๋ฉด RGB์ฝ”๋“œ์—์„œ๋Š” ์ข€ ๋‹จ์ˆœํ™”๋œ ์ƒ‰๊น”๋งŒ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค๋Š” ๊ฒƒ์ด์ฃ . ๊ทธ ์ด์œ ์ธ์ฆ‰์Šจ RR ๋‘๊ฐœ๋กœ ํ‘œ์‹œํ•  ์ˆ˜ ์ด์—ˆ๋˜ ๋นจ๊ฐ„๊ณ„์—ด ์ƒ‰์ƒ์„ Rํ•˜๋‚˜๋กœ๋งŒ ๋‚˜ํƒ€๋‚ด์•ผํ•˜๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ๋“ค์–ด RGB์ฝ”๋“œ์˜ #FFF์—์„œ R์„ ๋‚˜ํƒ€๋‚ด๋Š” F๋Š” RRGGBB์˜ RR๋กœ ๋ณ€ํ™˜ํ•œ๋‹ค๋ฉด FF๊ฐ€ ๋˜๊ฒ ์ฃ . ๋งŒ์•ฝ RRGGBB์˜ RR๊ฐ’์— AD๊ฐ€ ๋“ค์–ด์žˆ์—ˆ๋‹ค๊ณ  ํ•˜๋ฉด ์ด๊ฒƒ์„ RGB๋กœ ํ‘œํ˜„ํ•  ์ˆ˜ ์žˆ์„ ๊นŒ์š”? ์•„๋‹™๋‹ˆ๋‹ค. ํ‘œํ˜„ํ•  ์ˆ˜ ์—†๊ฒ ์ฃ .
ColorColor HEX
 #000
 #F00
 #0F0
 #0FF
 #FF0
 #0FF
 #F0F
 #FFF

 

 

CSS Colors - RGB Values ( 10์ง„์ˆ˜ RGB ์ฝ”๋“œ )

์ด ๋ฐฉ๋ฒ•์€ rgb( ) ์†์„ฑ์„ ์ด์šฉํ•ฉ๋‹ˆ๋‹ค.  0 ๋ถ€ํ„ฐ 255 ์ˆซ์ž๋‚˜ ํผ์„ผํŠธ๋ฅผ ๊ฐ’์— ๋„ฃ์–ด์ค„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

NOTE: ๋ชจ๋“  ๋ธŒ๋ผ์šฐ์ €๊ฐ€ rgb() ์†์„ฑ์„ ์ง€์›ํ•˜๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๊ธฐ ๋•Œ๋ฌธ์— ์ด ๋ฐฉ๋ฒ•์€ ๊ถŒ์žฅํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. 

 

ColorColor RGB
 rgb(0,0,0)
 rgb(255,0,0)
 rgb(0,255,0)
 rgb(0,0,255)
 rgb(255,255,0)
 rgb(0,255,255)
 rgb(255,0,255)
 rgb(192,192,192)
 rgb(255,255,255)

 

์˜ˆ์ œ :  

<body style="color:rgb(0,0,255); background-color:rgb(0,255,0);"> 

Building Color Codes:

์ƒ‰๊น” ์ฝ”๋“œ๋ฅผ ๋งŒ๋“ค์–ด์ฃผ๋Š” ์นผ๋ผ ์ฝ”๋“œ ๋นŒ๋”๋ผ๋Š”๊ฒŒ ์žˆ๋„ค์š”.  HTML Color Code Builder.  

Browser Safe Colors:

์•„๋ž˜ ํ‘œ๋Š” ๋ธŒ๋ผ์šฐ์ €์˜ ์˜ํ–ฅ์ด๋‚˜ ์ปดํ“จํ„ฐ ๋””์Šคํ”Œ๋ ˆ์ด์˜ ์˜ํ–ฅ์„ ๊ฐ€์žฅ ์•ˆ๋ฐ›๋Š” ๊ทธ๋Ÿฐ ์นผ๋ผํ‘œ๋ผ๊ณ  ํ•˜๋„ค์š”. ์ด 216 ๊ฐœ์˜ ์ƒ‰๊น”์ด ์žˆ์Šต๋‹ˆ๋‹ค.

์ƒ‰๊น”์„ ๋ณด๊ณ  ๋ง˜์—๋“œ๋Š”๊ฑฐ ์ฝ”๋“œ ๊ณจ๋ผ๋‹ค๊ฐ€ ์“ฐ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹น. ^____^

 

0000000000330000660000990000CC0000FF
0033000033330033660033990033CC0033FF
0066000066330066660066990066CC0066FF
0099000099330099660099990099CC0099FF
00CC0000CC3300CC6600CC9900CCCC00CCFF
00FF0000FF3300FF6600FF9900FFCC00FFFF
3300003300333300663300993300CC3300FF
3333003333333333663333993333CC3333FF
3366003366333366663366993366CC3366FF
3399003399333399663399993399CC3399FF
33CC0033CC3333CC6633CC9933CCCC33CCFF
33FF0033FF3333FF6633FF9933FFCC33FFFF
6600006600336600666600996600CC6600FF
6633006633336633666633996633CC6633FF
6666006666336666666666996666CC6666FF
6699006699336699666699996699CC6699FF
66CC0066CC3366CC6666CC9966CCCC66CCFF
66FF0066FF3366FF6666FF9966FFCC66FFFF
9900009900339900669900999900CC9900FF
9933009933339933669933999933CC9933FF
9966009966339966669966999966CC9966FF
9999009999339999669999999999CC9999FF
99CC0099CC3399CC6699CC9999CCCC99CCFF
99FF0099FF3399FF6699FF9999FFCC99FFFF
CC0000CC0033CC0066CC0099CC00CCCC00FF
CC3300CC3333CC3366CC3399CC33CCCC33FF
CC6600CC6633CC6666CC6699CC66CCCC66FF
CC9900CC9933CC9966CC9999CC99CCCC99FF
CCCC00CCCC33CCCC66CCCC99CCCCCCCCCCFF
CCFF00CCFF33CCFF66CCFF99CCFFCCCCFFFF
FF0000FF0033FF0066FF0099FF00CCFF00FF
FF3300FF3333FF3366FF3399FF33CCFF33FF
FF6600FF6633FF6666FF6699FF66CCFF66FF
FF9900FF9933FF9966FF9999FF99CCFF99FF
FFCC00FFCC33FFCC66FFCC99FFCCCCFFCCFF
FFFF00FFFF33FFFF66FFFF99FFFFCCFFFFFF

 

 

 

 

 

Reference : http://www.tutorialspoint.com/css/css_colors.htm

 

 

 

 

๐Ÿ’ป Programming/CSS

[CSS] 4. Units ( ๋‹จ์œ„ )

CSS ์—์„œ ์‚ฌ์šฉํ•˜๋Š” ๋‹จ์œ„(Unit)

์‹ค์ œ๋กœ CSS๋กœ ๋ญ”๊ฐ€๋ฅผ ํ•˜๊ธฐ์ „์— ๊ธฐ๋ณธ๋ถ€ํ„ฐ ๋‹ค์ง€๊ณ  ๊ฐ€๋Š”๊ฒŒ ์ข‹๊ฒ ์ฃ ?

๊ทธ๋ž˜์„œ ์ด๋ฒˆ์—๋Š” ๊ฐ์ข… ์†์„ฑ๊ฐ’์— ์“ฐ์ด๋Š” ๋‹จ์œ„๋ฅผ ํ•œ๋ฒˆ ์•Œ์•„๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

 

CSS๋Š” ์ ˆ๋Œ€๊ฐ’์„ ๋‚˜ํƒ€๋‚ด๋Š” inches, centimeters, points ๋“ฑ๋“ฑ ๋ฟ ์•„๋‹ˆ๋ผ ์ƒ๋Œ€๊ฐ’์„ ๋‚˜ํƒ€๋‚ด๋Š” percentages๋‚˜ em ๋‹จ์œ„๋ฅผ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค. ์ด๋Ÿฐ ๋‹จ์œ„๋“ค์€ ์ž์ฃผ ์“ฐ์ด๊ธฐ ๋•Œ๋ฌธ์— ๊ผญ ์งš๊ณ  ๋„˜์–ด๊ฐ€์‹œ๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.

 

๋‹ค์Œ์€ ๋‹จ์œ„์™€ ๋‹จ์œ„์— ๋Œ€ํ•œ ์„ค๋ช… ๋ฐ ์‚ฌ์šฉ ์˜ˆ์ œ์ž…๋‹ˆ๋‹ค. 

Unit Description Example
% ํผ์„ผํŠธ p {font-size: 16pt; line-height: 125%;}
cm ์„ผํ‹ฐ๋ฏธํ„ฐ div {margin-bottom: 2cm;}
em em ๋‹จ์œ„๋Š” ํฐํŠธ์˜ ์‚ฌ์ด์ฆˆ์™€ ๋™์ผํ•˜๊ธฐ ๋•Œ๋ฌธ์— ํฐํŠธ์‚ฌ์ด์ฆˆ๋ฅผ 12pt๋กœ ์„ค์ •ํ•˜๋ฉด ๊ฐ em ๋‹จ์œ„๋Š” 12pt๊ฐ€ ๋ฉ๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ 2em์€ 24pt๊ฐ€ ๋˜๊ฒ ์ฃ  p {letter-spacing: 7em;}
ex ์ด ๊ฐ’์€ ํฐํŠธ์˜ x-๋†’์ด๊ฐ’์— ์ƒ๋Œ€์ ์ธ ๊ฐ’์ž…๋‹ˆ๋‹ค. x-๋†’์ด๊ฐ’์€ ํ•ด๋‹น ํฐํŠธ์˜ ์†Œ๋ฌธ์žx๊ฐ’์˜ ๋†’์ด์ž…๋‹ˆ๋‹ค. p {font-size: 24pt; line-height: 3ex;}
in ์ธ์น˜ p {word-spacing: .15in;}
mm ๋ฐ€๋ฆฌ๋ฏธํ„ฐ p {word-spacing: 15mm;}
pc picas๋ผ๋Š” ๋‹จ์œ„๋กœ 1 pica๋Š” 12 pt์™€ ๋™์ผํ•ฉ๋‹ˆ๋‹ค; ๋”ฐ๋ผ์„œ, 1์ธ์น˜์—๋Š” 6 picas ๊ฐ€ ์กด์žฌํ•ฉ๋‹ˆ๋‹ค. p {font-size: 20pc;}
pt ํฌ์ธํŠธ ๋‹จ์œ„๋กœ 1 pt๋Š” 72๋ถ„์˜ 1 ์ธ์น˜์ž…๋‹ˆ๋‹ค. body {font-size: 18pt;}
px ์Šคํฌ๋ฆฐ ํ”ฝ์…€ ๋‹จ์œ„ p {padding: 25px;}

 

example์— ์žˆ๋Š” ๋‚ด์šฉ์„ css ํŒŒ์ผ์— ์ž‘์„ฑํ•ด์„œ ๊ผญ!! ํ…Œ์ŠคํŠธํ•ด๋ณด์„ธ์š”~

 

 

 

 

Reference : http://www.tutorialspoint.com/css/css_measurement_units.htm 

 

 

CSS๋ฅผ HTML๋ฌธ์„œ์—์„œ ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์€ ๋„ค๊ฐ€์ง€๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ ์ค‘์—์„œ๋„ ๊ฐ€์žฅ ๋งŽ์ด ์“ฐ์ด๋Š” ๋ฐฉ๋ฒ•์€ inline CSS์™€ External CSS.

1. Embedded CSS - The <style> Element:

 <style> ์š”์†Œ๋ฅผ ์ด์šฉํ•ด์„œ <head>...</head> ํƒœ๊ทธ ๋‚ด์— ์‚ฝ์ž…ํ•˜๋Š” ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค. 

<head>
<style type="text/css" media="...">
Style Rules
............
</style>
</head>

์†์„ฑ:

 <style> ํƒœ๊ทธ ๋‚ด์˜ ์†์„ฑ๊ณผ ๊ฐ’์€ ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค.

Attribute Value Description
type text/css Specifies the style sheet language as a content-type (MIME type). This is required attribute.
media screen
tty
tv
projection
handheld
print
braille
aural
all
Specifies the device the document will be displayed on. Default value is all. This is optional attribute.

์˜ˆ์ œ:

<head>
<style type="text/css" media="all">
h1{
color: #36C;
}
</style>
</head>

2. Inline CSS - The style Attribute:

์ธ๋ผ์ธ CSS๋Š” ๊ทธ๋ƒฅ htmlํƒœ๊ทธ ์•ˆ์—๋‹ค๊ฐ€ ์จ๋„ฃ๋Š” ๊ฒƒ์„ ๋งํ•ฉ๋‹ˆ๋‹ค. ๊ฐ€์žฅ ์ผ๋ฐ˜์ ์œผ๋กœ ์ด๋ ‡๊ฒŒ ์‚ฌ์šฉํ•˜์ฃ . ๊ทธ๋Ÿฌ๋‹ค๊ฐ€ ๋”ฐ๋กœ ๋ถ„๋ฆฌํ•ด์„œ ๊ด€๋ฆฌํ•ด์•ผ๋˜๋Š” ์Šคํƒ€์ผ์ด ์žˆ๋‹ค๋ฉด ์ด ๋‹ค์Œ์— ์„ค๋ช…ํ•œ External CSS๋ฅผ ์ด์šฉํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. 

<element style="...style rules....">

์†์„ฑ:

Attribute Value Description
style style rules The value of style attribute is a combination of style declarations separated by semicolon (;).

์˜ˆ์ œ:

<h1 style ="color:#36C;"> This is inline CSS </h1>

 

์ ์šฉ๋œ ๊ฒฐ๊ณผ๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค. 

This is inline CSS

3. External CSS - The <link> Element:

 <link> ์š”์†Œ๋ฅผ ์ด์šฉํ•˜์—ฌ HTML ๋ฌธ์„œ์— ์™ธ๋ถ€์—์„œ ์ •์˜๋œ CSSํŒŒ์ผ์„ ๋งํฌ์‹œํ‚ฌ ์ˆ˜๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. 

๊ฐ„๋‹จํ•œ ๋ฌธ๋ฒ•์„ ํ•œ๋ฒˆ ๋ณผ๊นŒ์š”??

<head>
<link type="text/css" href="..." media="..." />
</head>

์†์„ฑ:

 <link> ํƒœ๊ทธ์˜ ์†์„ฑ๊ณผ ์†์„ฑ๊ฐ’๋“ค ์ž…๋‹ˆ๋‹ค. 

Attribute Value Description
type text/css Specifies the style sheet language as a content-type (MIME type). This attribute is required.
href URL Specifies the style sheet file having Style rules. This attribute is a required.
media screen
tty
tv
projection
handheld
print
braille
aural
all
Specifies the device the document will be displayed on. Default value is all. This is optional attribute.

์˜ˆ์ œ:

๊ฐ„๋‹จํ•˜๊ฒŒ mystyle.css ๋ฅผ ๋งŒ๋“ค์–ด ๋ด…์‹œ๋‹ค.

h1, h2, h3 {
color: #36C;
font-weight: normal;
letter-spacing: .4em;
margin-bottom: 1em;
text-transform: lowercase;
}

 

์ด์ œ mystyle.cssํŒŒ์ผ์„ HTML๋ฌธ์„œ์— ๋งํฌ๋ฅผ ์‹œ์ผœ๋ณผ๊นŒ์š”??

<head>
<link type="text/css" href="mystyle.css" media="all" />
</head>

4. Imported CSS - @import Rule:

@import ๋ฅผ ์ด์šฉํ•ด์„œ <link> ์š”์†Œ์ฒ˜๋Ÿผ ์Šคํƒ€์ผํŒŒ์ผ์— ๋งํฌ๋ฅผ ๊ฑธ ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.  ๊ธฐ๋ณธ๋ฌธ๋ฒ•์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

<head>
@import "URL";
</head>

 

์•„๋ž˜์ฒ˜๋Ÿผ url()๋ฉ”์†Œ๋“œ๋ฅผ ์ด์šฉํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

<head>
@import url("URL");
</head>

์˜ˆ์ œ:

<head>
@import "mystyle.css";
</head>

CSS Rules Overriding ( ๊ทœ์น™ ์˜ค๋ฒ„๋ผ์ด๋”ฉ )

์ง€๊ธˆ๊นŒ์ง€ CSS๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋„ค๊ฐ€์ง€ ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด์„œ ์•Œ์•„๋ณด์•˜์Šต๋‹ˆ๋‹ค. ์ด ๋„ค๊ฐ€์ง€ ๊ทœ์น™์ด ๋™์‹œ์— ์ ์šฉ์ด ๋œ๋‹ค๋ฉด ์–ด๋–ค์ผ์ด ๋ฒŒ์–ด์งˆ๊นŒ์š”??? ์„œ๋กœ์„œ๋กœ ์˜ค๋ฒ„๋ผ์ด๋”ฉ์„ ํ•˜๊ฒŒ ๋˜๋Š”๋ฐ ๊ทธ ๊ทœ์น™์„ ํ•œ๋ฒˆ ์•Œ์•„๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. 

  • inline ์Šคํƒ€์ผ์ด ๋‹ค๋ฅธ ๋ฐฉ๋ฒ•๋ณด๋‹ค ํ•ญ์ƒ ์ตœ์šฐ์„ ์‹œ ์ ์šฉ๋ฉ๋‹ˆ๋‹ค.  

  • <style>...</style> ํƒœ๊ทธ ๋‚ด์— ์ง€์ •๋œ ์Šคํƒ€์ผ๋“ค์€ ์™ธ๋ถ€ CSSํŒŒ์ผ์— ์ •์˜๋œ ๊ฐ’๋“ค๋ณด๋‹ค ์šฐ์„ ๊ถŒ์„ ๊ฐ€์ง‘๋‹ˆ๋‹ค.

  • ์™ธ๋ถ€ CSSํŒŒ์ผ์€ ํ•ญ์ƒ ์ตœ์ €์šฐ์„ ๊ถŒ์„ ๊ฐ€์ง‘๋‹ˆ๋‹ค. 

Handling old Browsers ( ๊ตฌ๋ฒ„์ „ ๋ธŒ๋ผ์šฐ์ € ์ฒ˜๋ฆฌ )

๊ตฌ๋ฒ„์ „ ๋ธŒ๋ผ์šฐ์ € ์ค‘์—๋Š” CSS๋ฅผ ์ง€์›ํ•˜์ง€ ์•Š๋Š” ๋ธŒ๋ผ์šฐ์ €๊ฐ€ ์žˆ๊ณ  ์ด๋Ÿฐ ๋ธŒ๋ผ์šฐ์ €๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ์‚ฌ์šฉ์ž๋“ค์ด ์žˆ์„ ์ˆ˜๋„ ์žˆ๊ฒ ์ฃ . ๋งŒ์•ฝ ๊ทธ๋Ÿด๊ฒฝ์šฐ์—๋Š” CSS๋ฅผ ์ ์šฉํ•˜์ง€ ์•Š๋„๋ก ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์•„๋ž˜์ฒ˜๋Ÿผ <!-- ์™€  --> ๋กœ ๊ฐ์‹ธ์„œ ๋ง์ด์ฃ . 

<style type="text/css">
<!--
body, td {
   color: blue;
}
-->
</style>

CSS Comments ( ์ฃผ์„ )

CSS์—์„œ ์ฃผ์„์€ /* ์ฃผ์„์ฒ˜๋ฆฌ ํ•  ๋‚ด์šฉ */  ์ด๋ ‡๊ฒŒ ์“ฐ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. ์—ฌ๋Ÿฌ ์ค„์— ๊ฑธ์ณ๋„ ๊ด€๊ณ„ ์—†์Šต๋‹ˆ๋‹ค. 

์˜ˆ์ œ:

/* This is an external style sheet file */
h1, h2, h3 {
color: #36C;
font-weight: normal;
letter-spacing: .4em;
margin-bottom: 1em;
text-transform: lowercase;
}
/* end of 
style rules. */

 

 

 

 

 

 

Reference : http://www.tutorialspoint.com/css/css_inclusion.htm

 

 

 

 

 

 

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

[CSS] 6. Background ( ๋ฐฐ๊ฒฝ ์„ค์ • )  (0) 2016.06.12
[CSS] 5. Colors ( ์ƒ‰๊น” )  (0) 2016.06.12
[CSS] 4. Units ( ๋‹จ์œ„ )  (0) 2016.06.12
[CSS] 2. Syntax ( ๋ฌธ๋ฒ•, ์‚ฌ์šฉ๋ฒ• )  (0) 2016.06.12
[CSS] 1. CSS๋ž€ ?  (0) 2016.06.11

 

CSS ๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๋ฉด ๋ฌธ๋ฒ•์— ๋”ฐ๋ผ์•ผ๊ฒ ์ฃ ?? ์ด๋ฒˆ ํฌ์ŠคํŒ…์—์„œ๋Š” ๊ทธ ๋ฌธ๋ฒ•์— ๋Œ€ํ•ด์„œ ์•Œ์•„๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.  

CSS๋Š” ์Šคํƒ€์ผ ๊ทœ์น™์„ ๋”ฐ๋ฅด๋Š”๋ฐ ์ด ์Šคํƒ€์ผ ๊ทœ์น™์—๋Š” ์„ธ๊ฐ€์ง€ ์š”์†Œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. 

  • ์…€๋ ‰ํ„ฐ : ์…€๋ ‰ํ„ฐ๋Š” HTML ํƒœ๊ทธ์˜ ์ด๋ฆ„์„ ๋งํ•ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ๋“ค๋ฉด <h1> ํƒœ๊ทธ์˜ h1์ด๋‚˜ <table> ํƒœ๊ทธ์˜ table์ด ์…€๋ ‰ํ„ฐ์ธ๊ฑฐ์ฃ .

  • ์†์„ฑ : ์†์„ฑ์€ htmlํƒœ๊ทธ ๋‚ด์—์„œ ์‚ฌ์šฉ๋˜๋Š” ๊ทธ๋Ÿฐ ์†์„ฑ๋“ค์„ ๋งํ•ฉ๋‹ˆ๋‹ค. color๋‚˜ border๊ฐ™์€ ๊ฒƒ๋“ค์„ ๋งํ•˜๋Š”๊ฑฐ์ฃ .

  • ๊ฐ’ : ์ด ๊ฐ’์€ ์†์„ฑ์— ํ• ๋‹น๋˜๋Š” ๊ฐ’์„ ๋งํ•ฉ๋‹ˆ๋‹ค. color์†์„ฑ์ด red๊ฐ’์„ ๊ฐ–๋Š”๋‹ค ๋ญ ์ด๋Ÿฐ๊ฑฐ์ฃ .

์ด ์„ธ๊ฐ€์ง€ ์š”์†Œ๋ฅผ ํ•ฉํ•˜๋ฉด ๊ทธ๊ฒŒ๋ฐ”๋กœ ์•„๋ž˜์™€ ๊ฐ™์€ ์Šคํƒ€์ผ ๊ทœ์น™์ž…๋‹ˆ๋‹ค.

์…€๋ ‰ํ„ฐ { ์†์„ฑ : ๊ฐ’ }

์˜ˆ์ œ : ํ…Œ์ด๋ธ” ์…€๋ ‰ํ„ฐ์˜ ์†์„ฑ ์ง€์ •ํ•˜๊ธฐ

table{ border :1px solid #C00; }

์œ„ ์˜ˆ์ œ๊ฐ€ ๋ญํ•˜๋Š”๊ฑด์ง€ ์ดํ•ด๊ฐ€ ๋˜๋‚˜์š”? tableํƒœ๊ทธ์˜ ์†์„ฑ ์ค‘์— border ์†์„ฑ ๊ฐ’์„ 1px solid #C00 ๋กœ ์„ค์ •์„ ํ•œ๊ฒ๋‹ˆ๋‹ค.

 

์ž, ์ด์ œ ์–ด๋Š์ •๋„ ๊ฐ์ด ์˜ค๋‚˜์š”???  

 

๊ทธ๋Ÿผ ์ด์ œ ์…€๋ ‰ํ„ฐ๋“ค์ด ์–ด๋–ค ๊ฒƒ๋“ค์ด ์žˆ๋Š”์ง€๋„ ํ•œ๋ฒˆ ๋ด๋ณผ๊นŒ์š”? 

The Type Selectors ( ํƒ€์ž… ์…€๋ ‰ํ„ฐ )

h1ํƒœ๊ทธ๊ฐ€ ๋ญ”์ง€๋Š” ์ด๋ฏธ ์•„์‹œ๊ฒ ์ฃ ? ๋ ˆ๋ฒจ1 ํ—ค๋” ํƒœ๊ทธ์ฃ . ๊ทธ ํƒœ๊ทธ์˜ ์ƒ‰๊น” ์†์„ฑ์„ ์ง€์ •ํ•ด์ฃผ๋Š” ์˜ˆ์ œ๊ฐ€ ๋ฐ‘์— ์žˆ๊ตฐ์š”.

h1 { 
   color: #36CFFF; 
}

The Universal Selectors ( ์œ ๋‹ˆ๋ฒ„์„ค ์…€๋ ‰ํ„ฐ )

ํ•˜๋‚˜์˜ ํŠน์ •ํ•œ ์…€๋ ‰ํ„ฐ๋ฅผ ์„ ํƒํ•˜๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๋ผ ๋ชจ๋“  ์…€๋ ‰ํ„ฐ์— ๋Œ€ํ•ด์„œ ์†์„ฑ์„ ์ง€์ •ํ•ด์ฃผ๊ณ  ์‹ถ์„๋•Œ ์‚ฌ์šฉํ•˜๋Š” ์œ ๋‹ˆ๋ฒ„์„ค ์…€๋ ‰ํ„ฐ์ž…๋‹ˆ๋‹ค. * ๊ธฐํ˜ธ๋Š” "๋ชจ๋“ "์ด๋ผ๋Š” ์˜๋ฏธ๋ฅผ ๊ฐ–๊ณ ์žˆ์ฃ .

* { 
  color: #000000; 
}

๋ชจ๋“  ์…€๋ ‰ํ„ฐ(ํƒœ๊ทธ)์— ๋Œ€ํ•ด์„œ ์ƒ‰๊นŒ ์†์„ฑ๊ฐ’์„ ๊ฒ€์ •์œผ๋กœ ์„ค์ •ํ•œ ์˜ˆ์ œ์ฃ ? ์•„๋‹Œ๊ฐ€์š”? 

The Descendant Selectors ( ํ›„์† ์…€๋ ‰ํ„ฐ )

ํƒœ๊ทธ์•ˆ์— ๋˜ ๋‹ค๋ฅธ ํƒœ๊ทธ๊ฐ€ ๋“ค์–ด๊ฐˆ ์ˆ˜๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋Ÿด๋•Œ ํ›„์† ์…€๋ ‰ํ„ฐ์— ๋Œ€ํ•ด์„œ๋งŒ ์ ์šฉ์„ ํ•˜๊ณ  ์‹ถ์€ ์†์„ฑ๊ฐ’์ด ์žˆ์„ํ…๋ฐ ๊ทธ๋Ÿด๋•Œ๋Š” ์•„๋ž˜์™€ ๊ฐ™์ด ์‚ฌ์šฉํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. ์•„๋ž˜ ์˜ˆ์ œ๋Š” ulํƒœ๊ทธ ์•ˆ์— ์‚ฌ์šฉ๋œ emํƒœ๊ทธ์˜ ์†์„ฑ์„ ์ง€์ •ํ•ด์ฃผ๋Š” ์˜ˆ์ œ์ž…๋‹ˆ๋‹ค.

ul em {
  color: #000000; 
}

The Class Selectors ( ํด๋ž˜์Šค ์…€๋ ‰ํ„ฐ )

๋งŒ์•ฝ ํด๋ž˜์Šค ๋‹จ์œ„๋กœ ์†์„ฑ๊ฐ’์„ ์ง€์ •ํ•ด์ฃผ๊ณ  ์‹ถ๋‹ค๋ฉด ํด๋ž˜์Šค ์…€๋ ‰ํ„ฐ๋ฅผ ์‚ฌ์šฉํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.  

์‚ฌ์šฉ๋ฒ•์€ ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค. ์ (.)์„ ์ฐ๊ณ  ๋ถ™์—ฌ์„œ ํด๋ž˜์Šค๋ช…์„ ์จ์ฃผ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. 

.black {
  color: #000000; 
}

์œ„ ์˜ˆ์ œ๋Š” blackํด๋ž˜์Šค์— ์†ํ•œ ๋ชจ๋“  ํƒœ๊ทธ์˜ ์ƒ‰์„ ๊ฒ€์ •์ƒ‰(#000000)์œผ๋กœ ์ง€์ •ํ•ด์ฃผ๋Š” ์˜ˆ์ œ๋„ค์š” . ์ข€ ๋” ๋ฒ”์œ„๋ฅผ ์ขํ˜€์„œ ์•„๋ž˜์ฒ˜๋Ÿผ ์‚ฌ์šฉํ•˜์‹ค ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.  

h1.black {
  color: #000000; 
}

 <h1> ํƒœ๊ทธ์ด๋ฉด์„œ blackํด๋ž˜์Šค์— ์†ํ•œ ํƒœ๊ทธ๋“ค์˜ ์ƒ‰๊น”์„ ๋ชจ๋‘ #000000์œผ๋กœ ์ง€์ •ํ•ด์ฃผ๋Š” ์˜ˆ์ œ๊ตฐ์š”.

 

# ์ฐธ๊ณ ๋กœ ์•„๋ž˜์ฒ˜๋Ÿผ ํ•˜๋‚˜์˜ ํƒœ๊ทธ์— ์—ฌ๋Ÿฌ๊ฐœ์˜ ํด๋ž˜์Šค๋ฅผ ๋ถ€์—ฌํ•  ์ˆ˜ ์žˆ๋‹ค๋Š” ์ ๋„ ์•Œ๊ณ ๊ณ„์‹œ๋ฉด ์ข‹๊ฒ ๋„ค์š”:

<p class="center bold">
This para will be styled by the classes center and bold.
</p>

The ID Selectors ( ์•„์ด๋”” ์…€๋ ‰ํ„ฐ )

์ด๋ฒˆ์—๋Š” ์•„์ด๋”” ์…€๋ ‰ํ„ฐ์— ๋Œ€ํ•ด์„œ ๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. ๋ชจ๋“  ํƒœ๊ทธ์—๋Š” ์•„์ด๋””๋ฅผ ๋ถ€์—ฌํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๊ทธ๋ ‡๊ฒŒ ๋ถ€์—ฌ๋œ ์•„์ด๋””๋ฅผ ์…€๋ ‰ํŠธํ•˜๊ธฐ์œ„ํ•ด์„œ๋Š” # ๊ธฐํ˜ธ๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. 

#black {
  color: #000000; 
}

์œ„ ์˜ˆ์ œ๋Š” id๊ฐ€ black์ธ ์š”์†Œ์˜ ์ƒ‰๊น”์„ ๊ฒ€์ •์œผ๋กœ ์ง€์ •ํ•˜๋Š” ์˜ˆ์ œ์ž…๋‹ˆ๋‹ค.

h1#black {
  color: #000000; 
}

์œ„ ์˜ˆ์ œ๋Š” <h1> ์š”์†Œ๋‚ด์˜ ๋ชจ๋“  ์š”์†Œ๋“ค ์ค‘์—์„œ id๊ฐ€ black์ธ ๋…€์„์—๊ฒŒ๋งŒ ๊ฒ€์ •์ƒ‰ ์†์„ฑ์„ ์ฃผ์—ˆ๋„ค์š”

์ด id์…€๋ ‰ํ„ฐ๊ฐ€ ๊ฐ€์žฅ ์œ ์šฉํ•˜๊ฒŒ ์“ฐ์ด๋Š” ๊ฒฝ์šฐ๋Š” ์•„๋ž˜์ฒ˜๋Ÿผ ํ›„์† ์…€๋ ‰ํ„ฐ๋“ค์—๊ฒŒ ์†์„ฑ์„ ๋ถ€์—ฌํ•  ๋•Œ์ž…๋‹ˆ๋‹ค.

#black h2 {
  color: #000000; 
}

์œ„ ์˜ˆ์ œ๋Š” ํƒœ๊ทธid๊ฐ€ black์ธ ํƒœ๊ทธ๋‚ด์˜ h2ํƒœ๊ทธ์˜ ์ƒ‰๊น” ์†์„ฑ๊ฐ’์„ ์ง€์ •ํ•ด์ฃผ๋Š” ์˜ˆ์ œ์ฃ ? ์•„๋‹Œ๊ฐ€์š”? ๋งž์Šต๋‹ˆ๋‹ค. 

The Child Selectors ( ์ž์‹ ์…€๋ ‰ํ„ฐ )

์œ„์—์„œ ๋งํ•œ ํ›„์† ์…€๋ ‰ํ„ฐ๋Š” descendant ๋ผ๊ณ ํ•˜์—ฌ ๋ชจ๋“  ํ›„์†๋“ค์— ๋Œ€ํ•ด ์ ์šฉ์ด ๋ฉ๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ์ด ์ž์‹ ์…€๋ ‰ํ„ฐ๋Š” ์ง๊ณ„ ์ž์‹๋งŒ ํ•ด๋‹น์ด ๋ฉ๋‹ˆ๋‹ค. ์˜ˆ์ œ๋ฅผ ํ•œ๋ฒˆ ๋ณด์‹ค๊นŒ์š”.

body > p {
  color: #000000; 
}

<body> ํƒœ๊ทธ ๋ฐ”๋กœ ๋ฐ‘์— ์žˆ๋Š” <p> ์— ๋Œ€ํ•ด์„œ๋งŒ ์ ์šฉ๋˜๋Š” ์Šคํƒ€์ผ์„ ์ •์˜ํ–ˆ๊ตฐ์š”. body์•ˆ์˜ div์•ˆ์—์„œ ์‚ฌ์šฉ๋œ pํƒœ๊ทธ๋Š” ์œ„ ์Šคํƒ€์ผ์˜ ์ ์šฉ์„ ๋ฐ›์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

The Attribute Selectors ( ์†์„ฑ ์…€๋ ‰ํ„ฐ )

์•„๋ž˜ ์˜ˆ์ œ๋Š” inputํƒœ๊ทธ์˜ type์†์„ฑ์ด text์ธ ๋…€์„๋“ค์˜ ์ƒ‰์„ ์ง€์ •ํ•ด์ฃผ๋Š” ์˜ˆ์ œ์ž…๋‹ˆ๋‹ค.

input[type="text"]{
  color: #000000; 
}

์œ„์— ์ •์˜๋œ ์Šคํƒ€์ผ์€ <input type="submit" /> ์š”์†Œ์—๋Š” ์ ์šฉ์ด ๋˜์ง€ ์•Š๋Š”๋‹ค๋Š” ๊ฒƒ์ด์ฃ .

์•„๋ž˜๋Š” ์†์„ฑ ์…€๋ ‰ํ„ฐ์˜ ์‚ฌ์šฉ๋ฒ•์ž…๋‹ˆ๋‹ค.

  • p[lang]lang ์†์„ฑ์„ ๊ฐ–๋Š” ๋ชจ๋“  ๋ฌธ๋‹จ์š”์†Œ๋ฅผ ์„ ํƒ.

  • p[lang="fr"] - lang attribute์ด "fr"์ธ ๋ชจ๋“  ๋ฌธ๋‹จ ์š”์†Œ๋ฅผ ์„ ํƒ.

  • p[lang~="fr"] - lang ์†์„ฑ์ด "fr"์„ ํฌํ•จํ•˜๋Š” ๋ชจ๋“  ๋ฌธ๋‹จ ์š”์†Œ๋ฅผ ์„ ํƒ.

  • p[lang|="en"] - lang ์†์„ฑ์ด "en"์ด๊ฑฐ๋‚˜ ๋˜๋Š” "en"์œผ๋กœ ์‹œ์ž‘ํ•˜๋Š” ๋ฌธ๋‹จ ์š”์†Œ๋ฅผ ์„ ํƒ.

Multiple Style Rules ( ๋‹ค์ค‘ ์Šคํƒ€์ผ ๊ทœ์น™ )

์ง€๊ธˆ๊นŒ์ง€๋Š” ํ•˜๋‚˜์˜ ์š”์†Œ์— ํ•˜๋‚˜์˜ ์Šคํƒ€์ผ๋งŒ ์ ์šฉ์„ ํ–ˆ์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ์š”์†Œ๋งˆ๋‹ค ์—ฌ๋Ÿฌ๊ฐœ์˜ ์†์„ฑ์„ ๊ฐ€์งˆ ์ˆ˜ ์žˆ์œผ๋‹ˆ ์—ฌ๋Ÿฌ๊ฐœ์˜ ์Šคํƒ€์ผ์„ ์ง€์ •ํ•  ์ˆ˜๋„ ์žˆ์–ด์•ผ๊ฒ ์ฃ ?  

h1 {
color: #36C;
font-weight: normal;
letter-spacing: .4em;
margin-bottom: 1em;
text-transform: lowercase;
}

์œ„ ์˜ˆ์ œ์ฒ˜๋Ÿผ ์„ธ๋ฏธ์ฝœ๋ก  (;) ์œผ๋กœ ์Šคํƒ€์ผ์„ ๊ตฌ๋ถ„ํ•˜์—ฌ ์ •์˜ํ•ด์ฃผ๋ฉด ๋ฉ๋‹ˆ๋‹ค. ๊ฐ„๋‹จํ•˜์ฃ ?

๊ฐ ์†์„ฑ์— ์ง€์ •๋œ ์†์„ฑ๊ฐ’๋“ค์— ๋Œ€ํ•ด์„œ๋Š” ์ด๊ฒŒ ๋ญ”๊ฐ€ ํ•˜์‹ค ์ˆ˜๋„ ์žˆ๋Š”๋ฐ ์‹ ๊ฒฝ์“ฐ์ง€๋งˆ์‹œ๊ณ  ์ผ๋‹จ ๋„˜์–ด๊ฐ€์„ธ์š”. ์ฐจ๊ทผ์ฐจ๊ทผ ๋ฐฐ์šฐ๋ฉด ๋ฉ๋‹ˆ๋‹ค ^___^ 

Grouping Selectors ( ์…€๋ ‰ํ„ฐ ๊ทธ๋ฃนํ™” )

๋‚ด๊ฐ€ ์ง€์ •ํ•œ ์Šคํƒ€์ผ์„ ์—ฌ๋Ÿฌ๊ฐœ์˜ ์š”์†Œ์— ํ•œ๊บผ๋ฒˆ์—!!!!  ์ ์šฉํ•˜๊ณ  ์‹ถ์œผ์‹œ๋‹ค๋ฉด!!!!

h1, h2, h3 {
color: #36C;
font-weight: normal;
letter-spacing: .4em;
margin-bottom: 1em;
text-transform: lowercase;
}

์œ„ ์˜ˆ์ œ๋Š” h1, h2 and h3 ์š”์†Œ์— ํ•œ๊บผ๋ฒˆ์— ์Šคํƒ€์ผ์„ ์ ์šฉ์‹œํ‚ค๋Š” ์˜ˆ์ œ์ž…๋‹ˆ๋‹ค. ์ˆœ์„œ๋Š” ์ „ํ˜€ ์ƒ๊ด€์ด ์—†๊ตฌ์š” ์ฝค๋งˆ๋ฅผ ์ด์šฉํ•ด์„œ ์…€๋ ‰ํ„ฐ๋“ค์„ ๊ตฌ๋ถ„์ง€์–ด์ฃผ์‹œ๋ฉด ๋˜๊ฒ ์Šต๋‹ˆ๋‹ค. ์•„๋ž˜์ฒ˜๋Ÿผ ์•„์ด๋”” ์…€๋ ‰ํ„ฐ๋ฅผ ์ด์šฉํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

#content, #footer, #supplement {
position: absolute;
left: 510px;
width: 200px;
}

ํด๋ž˜์Šค ์…€๋ ‰ํ„ฐ๋‚˜ ๋‹ค๋ฅธ ์…€๋ ‰ํ„ฐ๋“ค์„ ํ•จ๊ป˜ ์‚ฌ์šฉํ•ด๋ณด๋Š” ์—ฐ์Šต๋„ ํ•ด๋ณด์„ธ์š” ^____^

 

 

 

 

Reference : http://www.tutorialspoint.com/css/css_syntax.htm

 

 

 

 

 

 

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

[CSS] 6. Background ( ๋ฐฐ๊ฒฝ ์„ค์ • )  (0) 2016.06.12
[CSS] 5. Colors ( ์ƒ‰๊น” )  (0) 2016.06.12
[CSS] 4. Units ( ๋‹จ์œ„ )  (0) 2016.06.12
[CSS] 3. HTML์— CSS๋งํฌ - Associating Styles with HTML  (0) 2016.06.12
[CSS] 1. CSS๋ž€ ?  (0) 2016.06.11

๐Ÿ’ป Programming/CSS

[CSS] 1. CSS๋ž€ ?

์•ˆ๋…•ํ•˜์„ธ์š”~ ์ด๋ฒˆ์—๋Š” CSS์— ๋Œ€ํ•ด์„œ ์•Œ์•„๋ณผํ…๋ฐ์š”~

 

CSS๊ฐ€ ๋ญ”์ง€๋ฅผ ์•Œ๋ ค๋ฉด ๋ญ์˜ ์•ฝ์ž์ธ์ง€๋ถ€ํ„ฐ ์•Œ์•„๋ด์•ผ ๊ฒ ์ฃ ?

 

CSS๋Š” Cascading Style Sheets์˜ ์•ฝ์ž์ž…๋‹ˆ๋‹ค. ์บ์Šค์ผ€์ด๋”ฉ ์Šคํƒ€์ผ ์‹œํŠธ. ์Šคํƒ€์ผ์ด๋ผ๋Š” ๋‹จ์–ด๋ผ ๋“ค์–ด๊ฐ”์œผ๋‹ˆ ๋ญ”๊ฐ€ ์Šคํƒ€์ผ๋งํ•˜๊ธฐ์œ„ํ•œ ์–ด๋–ค๊ฑฐ๋ผ๊ณ  ์ƒ๊ฐํ•ด๋ณผ ์ˆ˜ ์žˆ์œผ๋ ค๋‚˜์š”?  

 

CSS๋Š” htmlํƒœ๊ทธ๋‚ด์˜ ์†์„ฑ๊ฐ’๋“ค์„ ๋”ฐ๋กœ ๋ถ„๋ฆฌํ•ด์„œ ์ €์žฅํ•ด๋†“๊ธฐ ์œ„ํ•ด์„œ ์‚ฌ์šฉ์ด ๋ฉ๋‹ˆ๋‹ค.

 

์™œ ๋”ฐ๋กœ ์ €์žฅํ•ด๋†“์„๊นŒ์š”??

 

์—ฌ๋Ÿฌ ํŽ˜์ด์ง€์—์„œ ์ ์šฉ์ด ๋˜์•ผํ•˜๋Š” ์Šคํƒ€์ผ๊ฐ’๋“ค์„ ๋ถ„๋ฆฌํ•ด์„œ ์ €์žฅํ•ด๋†“๊ณ  ์—ฌ๋Ÿฌ ํŽ˜์ด์ง€์—์„œ ๊ทธ๋ƒฅ ํ˜ธ์ถœํ•ด์„œ ์‚ฌ์šฉํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์žฌ์‚ฌ์šฉ์„ฑ์ด ๋†’์•„์ง€๊ณ  ๋˜‘๊ฐ™์€ ์†์„ฑ์„ ํƒ€์ดํ•‘ํ•ด์•ผํ•˜๋Š” ์ˆ˜๊ณ ๋„ ๋œ ์ˆ˜ ์žˆ์œผ๋ฉฐ ์‹œ๊ฐ„๋„ ๋‹จ์ถ•๋  ๊ฒƒ์ด๊ณ  ์œ ์ง€๋ณด์ˆ˜๋„ ์‰ฌ์›Œ์ง€๊ฒ ์ฃ ?

 

๊ทธ๋ž˜์„œ ์ ์  html๋‚ด์˜ ์†์„ฑ๋“ค์ด ์‚ฌ๋ผ์ง€๊ณ  ๋Œ€์‹  CSS๋ฅผ ์ด์šฉํ•˜๋Š” ๊ฒƒ์ด ํ‘œ์ค€์ด ๋ ๊ฑฐ๋ผ๋Š” ๋ง๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

(2020๋…„ ํ˜„์žฌ ์ด๋ฏธ ๊ทธ๋ ‡๊ฒŒ ๋˜์–ด๋ฒ„๋ ธ์Šต๋‹ˆ๋‹ค. html ๋‚ด์— inline style์„ ์ •์˜ํ•ด์„œ ์“ฐ๋Š” ์ผ์€ ๊ฑฐ์˜ ์—†์ฃ )

 

 

๊ทธ๋Ÿฌ๋ฉด ๊ธฐ๋ณธ์ ์ธ ๋ฌธ๋ฒ•์„ ์—ฌ๊ธฐ์„œ ํ•œ๋ฒˆ ์งš๊ณ  ๋„˜์–ด๊ฐ€๋ณผ๊นŒ์š”??

 

์—์ด ๊ทธ๋ƒฅ ๋‹ค์Œ์— ์•Œ์•„๋ณด๊ธฐ๋กœ ํ•˜์ฃ  ใ…‹ใ…‹