디스플레이 사용 HTML 요소에 사용되는 상자 유형을 지정하는 속성입니다.
예시
플렉스 컨테이너를 표시하기 위해 display 속성을 구현하기 위해 다음 코드를 실행할 수 있습니다.
<!DOCTYPE html>
<html>
<head>
<style>
.mycontainer {
display: flex;
height: 300px;
background-color: orange;
}
.mycontainer > div {
background-color: white;
text-align: center;
line-height: 90px;
font-size: 40px;
width: 100px;
margin: 50px;
}
</style>
</head>
<body>
<h1>Quiz</h1>
<div class = "mycontainer">
<div>Q1</div>
<div>Q2</div>
<div>Q3</div>
<div style = "align-self: center">Q4</div>
<div>Q5</div>
</div>
</body>
</html>