코드:
결과보기 »
<!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <title>CSS Forms</title> <style> input { width: 100%; padding: 10px 20px; margin: 5px 0; box-sizing: border-box; } input[type="text"] { border: solid 2px #FFE4B5; -webkit-transition: 0.5s; transition: 0.5s; outline: none; } input[type="text"]:focus { border: solid 2px #D2691E; } input[type="password"] { border: solid 1px black; } input[type="password"]:focus { background-color: #E0FFFF; } </style> </head> <body> <h1>포커스가 있는 input 요소의 스타일 설정</h1> <form> 사용자 : <br> <input type="text" name="username"><br> 비밀번호 : <br> <input type="password" name="password"> </form> </body> </html>