input 투명하게 만들기

박서현·2023년 8월 5일
0
post-thumbnail
post-custom-banner

🔻적용하지 않았을 때

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            background-color: lightblue;
        }
        .test{
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100vh;
        }
        input {
            width: 100px;
            border: none;
            border-bottom: 3px solid white;
        }
    </style>
</head>
<body>
    <div class="test">
        <input placeholder="입력해주세요">
    </div>
</body>
</html>

🔻input css에 'background-color: transparent;' 추가

input {
  width: 100px;
  border: none;
  background-color: transparent;
  border-bottom: 3px solid white;
}

post-custom-banner

0개의 댓글