2021_06_30 ๊ฐ๋ฐ์ผ์ง
1) ํ์ตํ ๋ด์ฉ
์ค๋์ HTML๊ณผ CSS ์ธ์ด๋ฅผ ํจ๊ป ์ฌ์ฉํ๋ ๋ฐฉ๋ฒ์ ๋ํด ์์๋ณด์๋ค.
๋จผ์ ๋๊ฐ์ง ์ธ์ด๋ฅผ ์์ด ์ฐ๊ฒ ๋๋ฉด ์ฝ๋๋ถ๋์ด ๊ธธ์ด์ง ๊ฒฝ์ฐ html ์ธ์ด์ css ์ ์ธ์ด๊ฐ ํผ์ฉ๋ผ ๊ฐ๋
์ฑ์ด ๋จ์ด์ง๋ค. -> ์ ์ง๋ณด์์๋ ์ด๋ ค์์ด ์๋ค.
๊ทธ๋ฌ๋ฏ๋ก ๋ฐ๋ก ๋ฌธ์๋ฅผ ์์ฑํ์ฌ ์๋ก ์ฐ๋ํด์ฃผ๋ ๋ฐฉ์์ฌ์ฉ์ด ์ข๋ค.
-๋ฐฉ๋ฒ :
1)css ํ์ผ ์์ฑ
2)์ธ๋ฑ์คํ์ผ์ ๊ธฐ์ค์ผ๋ก css ํ์ผ์ ๊ฐ์ ธ์จ๋ค.
(๋ณ๋์ฌํญ์ด์์๊ฒฝ์ฐ ๋ํ์ผ๋ชจ๋ ์๋ก์ ์ฅ)
3)๋๊ฐ๋ฅผ ๊ฐ์ด ๋ณด๊ธฐ ํธํ๋๋ก
'view - layout -columns2 (ํ๋ฉด๋ถํ ๊ธฐ๋ฅ)'์ ์ด์ฉํ๋ค.
1.html ์ฝ๋
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
h1 {
color: red;
}
</style>
<!--
<link ํ๊ทธ ์ฌ์ฉ rel="์ด๋ค๋ฌธ์์ธ์ง ์๋ ค์ค" type="์ด๋ค ์ธ์ด๋ก ๋์ด์๋์ง์๋ ค์ค"
herf="์ฐ๋๋ํ์ผ์ ๊ฒฝ๋ก">
-->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100;300;400;500;700;900&display=swap" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<!--ํ๊ทธ์์์ ๋ฐ๋ก ์คํ์ผ ์ฌ์ฉ๋ ๊ฐ๋ฅ-->
<h1 style="background-color: pink;">Hello World</h1>
<header>
<h1>header h1</h1>
<p>header</p>
<a href="#">๋ค์ด๋ฒ</a>
</header>
<footer>
<h1>footer h1</h1>
<p>footer p</p>
</footer>
<h1>Hello World</h1>
<h2 id="test1">Nice to meet you</h2>
<h3 class="test2">Welcome</h3>
<input type="text" placeholder="์ด๋ฆ">
<input type="password" placeholder="๋น๋ฐ๋ฒํธ">
<h2 id="color-1">ID ์ ํ์ง</h2>
<h3 class="bg-1 font-size-1">Class ์ ํ์ง</h3>
<p class="bg-1"> Welcome</p>
<h4 id="color-1"></h4>
<header id="intro">
<div class="container">
<h2>header h2</h2>
<p>header p</p>
</div>
</header>
<p>Out p</p>
<h1 style="color: gray;" id="color-2" class="color-1">Hello World</h1>
<header id="intro">
<div class="container">
<h1>header h1</h1>
</div>
</header>
<div>
<h1>Nice</h1>
<ul>
<li>๋ฉ๋ด1</li>
<li>๋ฉ๋ด2</li>
</ul>
</div>
<div id="bg"></div>
</body>
</html>
*๊ด๊ณ๋
<header>(๋ถ๋ชจํ๊ทธ-> css ๋ก ์คํ์ผ ๋ณ๊ฒฝํ ๊ฒฝ์ฐ ์์๋ค๊น์ง ์ํฅ์ ๋ฏธ์นจ
but ์์ ์ค์ค๋ก์ ์ ์ ์๊ฐ ๋ ์น์!
and ๋ชจ๋ ์์๋ค์ด ์ํฅ์ ๋ฐ์ง๋ ์์. ํ๊ทธ ์์ฒด์ ์ผ๋ก ์ปฌ๋ฌ๋ฅผ
๊ฐ์ง๊ณ ์์ผ๋ฉด ๋ถ๋ชจ์ ์ํฅ์ ๋ฐ์ง ์์ ex) a ํ๊ทธ)
<ul>(์์ํ๊ทธ)
<li></li>(ํ์ ํ๊ทธ)
<li></li>
<li></li>
</ul>
</header>
<div></div>(headerํ๊ทธ์ ํ์ )
<img src="icon.png" width="100px" height="50px" alr="๋ค์ด๋ฒ ๋ก๊ณ ">
- css ์ฝ๋
h1 {
font-size: 80px;
}
/* ๋ํ
์ผํ๊ฒํ๊ณ ์ถ์ ๊ฒฝ์ฐ ๋ถ๋ชจ์ ํ๊ทธ์ด๋ฆ์ ์
๋ ฅ
์ฝค๋ง๋ฅผ ์ด์ฉํ์ฌ ๋์์ ์์
๋ ๊ฐ๋ฅ */
header {
color: red;
}
header h1,
footer h1 {color: blue;}
header p,
footer p {color: green;}
footer h1 {color: blue;}
footer p {color: green;}
h1 {color: red;
}
/*๊ณ ์ ์๊ฐ์ ์ง์ ํจ์ผ๋ก์จ ๊ฒน์น๋ ํ๊ทธ๋ค์
๋ฐ๋ก ์คํ์ผ์ ์ง์ ํ ์์๋๋กํ๋๋ฐฉ๋ฒ*/
/*id์์ฑ๊ฐ(์ด๋ฆ- ํ๋๋ฐ์ ๊ฐ์ง ๋ชปํจ) ์ง์ ๋ฒ # ์ฌ์ฉ*/
#test1 {color: blue;}
/*class (๋ณ๋ช
- ํ์ฌ๋๋น ์ฌ๋ฌ๊ฐ ๋ณ๋ช
๊ฐ๋ฅ, ์ฌ์ฌ์ฉ๊ฐ๋ฅ)์ง์ ๋ฒ . ์ฌ์ฉ*/
.test2 {color: green;}
/*type์ ์ด์ฉํด์ ์์ฑ๊ฐ ์ง์ ๋ฐฉ๋ฒ [] ์ฌ์ฉ*/
input[type='text'] {
border: solid 10px red;
}
input[type='password'] {
border: solid 10px blue;
}
.bg-1 {
background-color: red;
}
.font-size-1 {
font-size: 50px;
}
#color-1 {
color: red;
}
#font-style-1 {
font-size: italic;
}
#intro h2{
color: red;
}
.container p {
color: blue;
}
header div p {
color: blue;
}
#intro .container p {
color: blue;
}
/*style์์ฑ>id>class>tag๋ง์ง๋ง>tag ์์ผ๋ก ์์๊ฐ ์ ํด์ง๋ค*/
#color-2 {color: pink;}
.color-1 {
color: green;
}
h1{
color: red;
}
h1{color: blue;}
/*๋ ๋ํ
์ผํ๊ฒ ์์ฑํ ์ ๋ก ์ฐ์ ์์๊ฐ ๋์์ง๋ค.*/
/*์๋ณธ์ฝ๋๋ ๋๋๊ณ ์๋ก์ด ๋์์ธ์ผ๋ก ๋ฎ์ด ์์ฐ๊ณ ์ถ์๋ */
#intro .container h1 {
color: pink;
}
#intro div h1 {
color: green;
}
#intro h1 {
color: blue;
}
header h1 {
color: red;
}
/*๊ณต๊ฐ์ ๋ํดํธ๊ฐ์ ํฌ๋ช
,
px ๋ ๊ณ ์ ๊ฐ
๋ธ๋ผ์ฐ์ ํฌ๊ธฐ์ ๋ฐ๋ผ ๊ณต๊ฐ์ด ์์ฐ์ค๋ฝ๊ฒ
resize ๋ฅผ ์ํ ๋๋ % ๋ฅผ ์ฌ์ฉ(๊ฐ๋ณ๊ฐ- ๊ธฐ์ค์ ์ ๊ธฐ์ค์ผ๋ก ํฌ๊ธฐ์ฑ
์ )
*/
div {
width: 100%;
height: 300px;
min-width: 700px ;
max-width: 900px;
border: solid 10px red;
border-radius: 50px;
background-color: yellow;
opacity: 1;
}
h1 {color: rgb(123, 111, 21);
font-size: 80px;
font-style: initial;
font-family: 'Noto Sans KR', sans-serif;
font-weight: 500;
text-decoration: underline;
text-align: right;
background-color: pink;
}
ul {list-style: none;}
/* ex)font-family: Arial, Times, sens-serif;
font family ์์ ์ ํ ์ฌ๋ฌํฐํธ์ ์์๋๋ก ์ฐ์ ์์๊ฐ ์ ์ฉ๋๋ค.
๋ธ๋ผ์ฐ์ ์์ ์ฌ์ฉ๊ฐ๋ฅํ ํฐํธ์ฌ์ฉ์ ์ํด ์์์ ์์๋๋ก ์ ์ฉ
ํญ์ ์ด๋ ๋ธ๋ผ์ฐ์ ์์๋ ๊ฐ๋ฅํ suns-serif๋ฅผ ๋ง์ง๋ง์ ๋ฃ์ด์ค๋ค.
text-align: right; ๋ก ์์น๋ฅผ ์ง์ ํด์ค ์ ์์ง๋ง,
background-color: pink*๋ฅผ ํตํด์ ์์ง์ผ ์ ์๋ ๋ฒ์๋ฅผ ํ์ธ ํ๋ฉด ์ข๋ค.
opacity: 0~1;/ 1์ ๊ฐ๊น์ธ์๋ก ์ ๋ช
*/
#bg {
width: 900px;
height: 900px;
background-color: yellow;
background-image: url(icon.png);
background-repeat: no-repeat;
background-position: center;}
/*๋ฐฐ๊ฒฝํ๋ฉด ์ด๋ฏธ์ง๊ฐ ํฌ๋ฆฌ๊ฐ ์ปค์ง์๋ก ๊ณ์ ์ ์ผ๋ก ๋ฐ๋ณต์ด ๋๋๋ฐ,
๊ทธ๊ฑฐ๋ฅผ ์ ์ดํ๊ธฐ ์ํด ์ฐ๋๊ฒ ,background-repeat:repeat-x,repeat-y,no-repeat ์ค ํ๋ ์ฌ์ฉ
background-position: ์์น;๋ฅผ ์ด์ฉํ์ฌ ๊ณต๊ฐ์์์ ์ด๋ฏธ์ง์ ์์น๋ฅผ ์ ํ ์ ์๋ค.*/
css ํ
๋๋ฆฌ
{border(ํ
๋๋ฆฌ๋ชจ์): solid(์ ) 10px(๊ตต๊ธฐ) red(์);}
font style (๊ตฌ๊ธ์์ ์ ์ํ ์น ํฐํธ๋ค)
fonts.google.com
*img ํ๊ทธ์ background ์ ์ฐจ์ด์
-img:
1. ํฌ๊ธฐ์ ์๊ด์์ด ๋น์จ์ ๊นจ์ง์ง๋ง ์๋ฆฌ๋ ํ์์์ด ์กฐ์ ๊ฐ๋ฅ
2.์ ๋ณด์ฑ์ ๊ฐ๊ณ ์๋ ์ด๋ฏธ์ง๋ alt ๊ฐ์ด ์๋ img ๋ฅผ ์ฌ์ฉํด์ผํ๋ค.(์น์ ๊ทผ์ฑ)
-backgroun:
1. ์ด๋ฏธ์ง๋ ์๋ ์ด๋ฏธ์ง๋ณด๋ค ์๊ฑฐ๋ ํฌ๋ฉด ์๋ฆฌ๊ฑฐ๋ ๋ฐ๋ณต๋๋ค. ์๋์ ์ด๋ฏธ์ง ํฌ๊ธฐ๊ฐ ๋ณํ์ง ์๋๋ค๋ ์๋ฏธ.
2) ํ์ต๋ด์ฉ ์ค ์ด๋ ค์ ๋ ์
์ง๊ธ๊น์ง ๋ฐฐ์์๋ ์ด๋ฏธ์ง ์ฝ์
๋ฐฉ๋ฒ, ๊ธ์ ํฌ๊ธฐ ์กฐ์ ๋ฑ์ ๋ฐฉ๋ฒ๋ง๊ณ ์กฐ๊ธ ๋ ๋ํ
์ผํ๊ฒ ๋ฐฐ์ธ ์ ์๋ ์๊ฐ์ด์์ผ๋,
์ด์ ์ ๋ด์ฉ๊ณผ ๋ญ๊ฐ ๋น์ทํ ๋๋์ ์ด๋ค ์ฐจ์ด๊ฐ ์๋์ง ๋ ์์ธํ ์์์ผํ ๊ฒ ๊ฐ์๋ค.
3) ํด๊ฒฐ๋ฐฉ๋ฒ
์์ง ํด๊ฒฐ ํ๋ค๊ณ ํ ์๋ ์์ผ๋, ์์ผ๋ก ๊ณ์ ์ฌ์ฉํด๊ฐ๋ฉด์ ์ฐจ์ด๋ฅผ ์ข๋ ๋ช ํํ๊ฒ ์๊ณ ์ฌ์ฉ ํ ์ ์๋๋ก ํด์ผ๊ฒ ๋ค.
4) ํ์ต์๊ฐ
์ค๋๋ ์๊ฐ๊ฐ๋์ค ๋ชจ๋ฅด๊ณ ๋์์๊ฐ์๋ฅผ ๋ค์ผ๋ฉฐ ๋ฐ๋ผํ๋ ๊ฒ ๊ฐ๋ค. ๊ทธ๋์ ์๋ง ํ๊ฐ์๋ ๋ฆ์ ๋ปํ๋ค! ์ผ๋ง๋ ๋๋๋์ง.. 10๋ถ์ ๋จ๊ฒจ๋๊ณ ์์์ฑ ํ๊ฒ์ง๊ฒ ์ํ์ ์น๋ค๋ค.
์์ผ๋ก๋ ๋์์ ์์ฒญ ์ค๊ฐ์ค๊ฐ์๋ ๊ณต์ง์ฌํญ์ ํ์ธ ํ ์ ์๋๋ก ํด์ผ๊ฒ ๋ค.
๊ทธ๋ฆฌ๊ณ ๋ค์ ์ด์ด์ ๋์์ ๊ฐ์๋ฅผ ๋ค์๋๋ฐ, ์กฐ๊ธ ์ฌ๋ค ๋ค์ ๋ค์ด์ ๊ทธ๋ฐ์ง ๋ ์ง์คํ ์ ์์๋๊ฒ ๊ฐ๋ค. ๋ ์ฌ๋ฌ๊ฐ์ง ๋ง์ ๊ธฐ๋ฅ๋ค์ ์ฌ์ฉํด๋ณด๋ ๋ ์ง๋ฃจํ์ง ์์์ ์ข์๋ค : )
Author And Source
์ด ๋ฌธ์ ์ ๊ดํ์ฌ(2021_06_30 ๊ฐ๋ฐ์ผ์ง), ์ฐ๋ฆฌ๋ ์ด๊ณณ์์ ๋ ๋ง์ ์๋ฃ๋ฅผ ๋ฐ๊ฒฌํ๊ณ ๋งํฌ๋ฅผ ํด๋ฆญํ์ฌ ๋ณด์๋ค https://velog.io/@526yeo_eunhye/20210630-๊ฐ๋ฐ์ผ์ง์ ์ ๊ท์: ์์์ ์ ๋ณด๊ฐ ์์์ URL์ ํฌํจ๋์ด ์์ผ๋ฉฐ ์ ์๊ถ์ ์์์ ์์ ์ ๋๋ค.
์ฐ์ํ ๊ฐ๋ฐ์ ์ฝํ
์ธ ๋ฐ๊ฒฌ์ ์ ๋
(Collection and Share based on the CC Protocol.)
์ข์ ์นํ์ด์ง ์ฆ๊ฒจ์ฐพ๊ธฐ
๊ฐ๋ฐ์ ์ฐ์ ์ฌ์ดํธ ์์ง
๊ฐ๋ฐ์๊ฐ ์์์ผ ํ ํ์ ์ฌ์ดํธ 100์ ์ถ์ฒ ์ฐ๋ฆฌ๋ ๋น์ ์ ์ํด 100๊ฐ์ ์์ฃผ ์ฌ์ฉํ๋ ๊ฐ๋ฐ์ ํ์ต ์ฌ์ดํธ๋ฅผ ์ ๋ฆฌํ์ต๋๋ค