<body>
<h2>κ°μκ°μ²΄ μμ보기</h2>
<p>
κ°μ²΄λ μμ±κ³Ό μμ±κ°μ μ§ν©μ΄λ€
<br>ex) h1νκ·Έλ μ¬λ¬κ°μ§ μμ±κ³Ό μμ±κ°μ κ°μ§κ³ μμ΅λλ€. λ°λΌμ h1λ νλμ κ°μ²΄μ
λλ€.
htmlλ¬Έμμ μ§μ μμ±λ κ°μ²΄λ₯Ό μ€μ‘΄κ°μ²΄λΌ νλ€λ©΄, κ°μκ°μ²΄λ htmlλ¬Έμκ° μλ cssμμ λ§λ€μ΄μ§ κ°μ²΄μ
λλ€.
</p>
<ul>
<li>νλͺ©1</li>
<li>νλͺ©2</li>
<li>νλͺ©3</li>
<li>νλͺ©4</li>
</ul>
<h3>κ°μκ°μ²΄ λ§λ€κΈ°</h3>
<p>
κ°μκ°μ²΄λ cssμμ λ§λ€ μ μκ³ , νΉμ μμμ μμννλ‘ λ§λ€ μ μμ΅λλ€.
<br>κ°μκ°μ²΄λ νΉμ μμμ 첫λ²μ§Έ μμμμΉ, λ§μ§λ§ μμμμΉμ λ§λ€ μ μμ΅λλ€.
</p>
<dl>
<dt>μ©μ΄νκ·Έ</dt>
<dd>μ€λͺ
νκ·Έ1</dd>
<dd>μ€λͺ
νκ·Έ2</dd>
</dl>
<div class="box">
<span>Text</span>
</div>
</body>
<style>
h2{
font-size: 36px;
line-height: 80px;
color: #000;
}
ul{
outline: 2px solid red;
margin-top: 40px;
}
ul::before{
display: block; content: '첫λ²μ§Έ μμμμΉμ κ°μκ°μ²΄';
}
ul li{
height: 40px; line-height: 40px;
outline: 1px dotted orange;
}
ul li:first-child{
background-color: #ccc;
}
ul::after{
display: block; content: 'λ§μ§λ§ μμμμΉμ κ°μκ°μ²΄';
}
dl{
outline: 3px solid blue;
}
dl dt,
dl dd{
height: 40px; line-height: 40px;
outline: 2px dotted deepskyblue;
}
dl::before{
display: block; content: 'dlμ κ°μ μμκ°μ²΄';
}
dl::after{
display: block; content: 'dlμ κ°μ μμκ°μ²΄';
}
dl dd:first-child{
background-color: #ccc;
}
dl dd:first-of-type{
background-color: #ccc;
}
.box{
background-color: #ccc;
line-height: 40px;
width: 120px;
text-align: center;
position: relative;
color: #000;
transition: width 0.3s;
}
.box:hover{
color: #fff;
}
.box span{
position: relative;
z-index: 2;
}
.box::after{
display: block; content: '';
width: 0;
height: 40px;
background-color: #000;
position: absolute;
z-index: 1;
bottom: 0;
transition: width 0.3s;
right: 0;
}
.box:hover:after{
width: 100%;
right: auto;
}
</style>