[HTML&CSS] naver 검색창 만들기개발자가 되기까지 (2023.08.16~2024.04.15)/[Basic] HTML & CSS2023. 11. 19. 23:02
Table of Contents
<Quest>
<Solve>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>네이버 검색창 만들어보기</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
<style>
a{
text-decoration: none;
}
input{
width: 220px;
height: 30px;
border: none;
outline: none;
font-weight: 700;
}
.search{
width: 350px;
height: 50px;
border: 1px solid #03c75a;
border-radius: 5px;
display: flex;
}
.search-input{
width: 300px;
height: 50px;
display: flex;
justify-content: space-around;
align-items: center;
position: relative;
}
.bi-keyboard{
font-size: 30px;
color: gray;
position: absolute;
transform: translateY(-50%); /* 수직 중앙*/
top: 45%;
right: 30px;
}
.icon2{
font-size: 15px;
color: #03c75a;
position: absolute;
transform: translateY(-50%); /* 수직 중앙*/
top: 50%;
right: 10px;
}
.bi-search{
font-size: 20px;
color: white;
}
button{
width: 50px;
height: 50px;
float: right;
border: none;
background-color: #03c75a;
}
</style>
</head>
<body>
<div class="search">
<div class="search-input">
<input type="text">
<a href="#">
<!-- 키보드 icon -->
<i class="bi bi-keyboard"></i>
</a>
<a href="#">
<!-- 아래 화살표 -->
<span class="icon2">▼</span>
</a>
</div>
<button type="button">
<!-- 돋보기 icon -->
<i class="bi bi-search"></i>
</button>
</div>
</body>
</html>
<Result>
[HTML&CSS] naver 검색창 만들기
(다음 게시물 예고편)
[HTML&CSS] 배달의 민족 메뉴 만들기
728x90
@rlozlr :: 얼렁뚱땅 개발자
얼렁뚱땅 주니어 개발자
포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!