반응형
Notice
Recent Posts
Recent Comments
Link
코딩일상
[HTML] block,inline 요소 본문
반응형
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<!-------block--->
<div>2</div>
<div>3</div>
<div>5</div>
<!------- inline--->
<span>1</span>
<span>2</span>
<span>3</span>
</body>
</html>
div,span {
width:80px;
height:80px;
margin:20px;
}
div{
background:red;
display: inline-block;
}
span{
background:blue;
display:block;
}
반응형
Comments