네이버 게임 웹페이지 실습 (오른쪽 영역)
실습코드 깃허브 링크
<style>
.right_section_body .input_wrap {
position: relative;
display: flex;
width: 250px;
height: 44px;
background-color: #f5f6fa;
border-radius: 12px;
margin-bottom: 18px;
overflow: hidden;
}
.right_section_body .input_wrap input {
width: calc(100% - 44px);
height: 100%;
padding: 10px 16px;
border: none;
font-size: 15px;
background-color: #f5f6fa;
color: #444;
}
.text_wrap .input_wrap button {
width: 44px;
height: 100%;
background-color: gray;
cursor: pointer;
}
</style>
<div class="image_wrap">
<div class="popular_img_more">
<span></span>
<span></span>
</div>
<div class="popular_img"></div>
<i class="chk"></i>
</div>
<style>
.popular_img_more {
position: absolute;
top: -4px;
right: -4px;
width: 21px;
height: 21px;
border-radius: 50%;
background-color: #7776FF;
}
.popular_img_more span {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 2px;
height: 10px;
background-color: #fff;
border-radius: 1px;
}
.popular_img_more span:nth-child(2) {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) rotate(90deg);
width: 2px;
height: 10px;
background-color: #fff;
border-radius: 1px;
}
</style>
<div class="popular_arrow">
<span></span>
<span></span>
</div>
<style>
.popular_arrow {
position: relative;
width: 14px;
height: 14px;
transform: rotate(90deg);
}
.popular_arrow span {
position: absolute;
top: 0%;
left: 0%;
width: 2px;
height: 10px;
transform: rotate(45deg);
background-color: gray;
}
.popular_arrow span:nth-child(2) {
position: absolute;
bottom: 0%;
left: 40%;
width: 2px;
height: 10px;
transform: rotate(135deg);
background-color: gray;
}
</style>
<li>
<a href="#">
<div></div><strong>페이커-쇼메이커가 생각하는 초시계의 가치</strong>
</a>
</li>
<style>
#news_section ul li {
position: relative;
width: 287px;
margin-bottom: 12px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>
강의시간에는 간단한 도형으로 표현했던 아이콘들을 직접 코딩으로 구현해보았다. 오랜만에 이런 도형들을 css로 디자인해보니 재미있었다.
오늘 right영역을 코딩하면서 초반에 검색영역부분이 가운데에서 올라오지 않아서 개발자 도구로 이것저것 만져보았다.
left영역과 right영역의 콘텐츠 길이가 다르다보니 이러한 현상이 생긴것 같다.
left와 right를 감싸고 있는 game_container에 align-items : center를 지우고 strech로 바꿔주니 같은 높이로 정렬되었다.