이전 포스트/코코아 html css
#3.9 Inline Block
병고라니
2020. 12. 6. 20:22
인라인 블럭을 쓰게 되면 responsive desgin에 적용을 못함
<!DOCTYPE html>
<html lang="kr">
<head>
<title>title</title>
<style>
div {
display: inline-block;
background-color: tomato;
width: 150px;
height: 150px;
}
</style>
</head>
<body>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</body>
</html>
위와 같이 코드를 쓰게되면 보여지는 화면에 따라 요소가 한줄에 있기도 하고 다른줄로 넘어가기 떄문에 화면에 따라
보여지는게 다름
그리고 각 box마다 약간씩 띄워저 있는데 이게 왜이런지도 모르겠고 그냥 생김..