728x90
반응형
<!-- src/main/webapp/7/otherselector.html -->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>input 선택자</title>
<style type="text/css">
input[type=text] {
background-color: yellow;
whdth: 50%;
}
/* input 태그에 입력이 가능한 경우 글자크기를 30px로 설정*/
input[type=text]:enabled {
font-size: 30px;
}
/* input 태그에 입력이 불가능한 경우 배경색을 검정, 글자색을 흰색으로 설정*/
input[type=text]:disabled {
background-color: black;
color : white;
}
</style>
</head>
<body>
아이디 : <input type="text" value="입력가능"><br>
이름 : <input type="text" value="입력불가능" readonly="readonly"><br>
주소 : <input type="text" value="입력불가능" disabled="disabled"><br>
</body>
</html>
728x90
반응형
'study > Html' 카테고리의 다른 글
[Html] 7. htmlcss (상태 선택자 : <overflow>, <:nth-child()>, <:first-child>, <:last-child>) (0) | 2022.04.04 |
---|---|
[Html] 7. htmlcss (반응 선택자: <:hover>, <:active>, <:link>, <:visited>) (0) | 2022.04.04 |
[Html] 7. htmlcss (메뉴만들기 : <nav>, <list-sytle-type>, <display>, <text-decoration>) (0) | 2022.04.04 |
[Html] 7. htmlcss (가로세로 : <div>, <span>) (0) | 2022.04.04 |
[Html] 7. htmlcss (박스모델 : <border>) (0) | 2022.04.04 |