WEB/html,CSS
[html][css] 속성 선택자 /input태그에서 text type만 선택하는 방법/ 특정 속성만 css를 바꾸는 방법
자바칩 프라푸치노
2021. 4. 4. 17:39
<결과 화면>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
input{
color:green;
font-size: 3rem;
}
input[type=text]{
color: orange;
}
input[type=tel]{
color: red;
}
img[src]{
border: 5px black;
}
</style>
</head>
<body>
<!-- 속성선택자 -->
<form action="">
이름: <input type="text"><br>
아이디: <input type="text"><br>
비밀번호: <input type="password"><br>
전화번호: <input type="tel"><br>
</form>
<img src="https://search.pstatic.net/common/?src=http%3A%2F%2Fblogfiles.naver.net%2FMjAyMTAzMDlfMjgg%2FMDAxNjE1MjY4MjM1NDI3.UPGULITVW-zQ7BqTcC6YZ7xSNCTpcEyKVPCMhH31YKQg.tBqXJeDQy8cMmA60AjJWVPAXNGlMlJFjO9BbH7LiCcIg.JPEG.vilip7%2F20210309_143658.jpg&type=sc960_832" alt="">
</body>
</html>
|
cs |
input에서 type이 text인 것만 선택하는 방법
input[type=text]
728x90