드롭다운을 통해 메뉴를 만들 때 유용하게 사용할 수 있는 화살표를 만들어보자
<div class='container'>
<div class='arrow'></div>
</div>
.container{
width:100px;
height:100px;
border:4px solid black;
margin:40px;
position: relative;
}
.arrow{
width:40px;
height:20px;
overflow:hidden;
/*border:4px solid red; */
position: absolute;
right:0;
top:-20px;
}
.arrow::before {
position: absolute;
content:'';
width:20px;
height:20px;
border:4px solid black;
transform: rotate(45deg);
transform-origin: 0 0;
top:0;
left:50%;
background-color:white;
}