웹표준,웹접근성(html, html5, css, css3, javascript, jQuery, jQueryMobile, snecha, senchaTouch, php, mobileWebApp)

15. :focus - 링크 선택자 본문

css3/selector

15. :focus - 링크 선택자

jokack01 2013. 10. 1. 10:15

:focus - 링크 선택자

: input 요소의 포커스 된 요소를 선택

 

ex) input요소에 클릭되어 있는 상태 - 글씨를 쓰려고 하는 상태 ( 예: input:focus )

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>:focus</title>
<style>
input:focus{
background-color:yellow;
}
</style>
</head>
<body>
<h1>:focus</h1>
<p>  input 요소의 포커스 된 요소를 선택 </p>
 
<form>
First name: <input type="text" name="firstname" /><br>
Last name: <input type="text" name="lastname" />
</form>
</body>
</html>

 

'css3 > selector' 카테고리의 다른 글

17. :first-line - 가상 선택자  (0) 2013.10.01
16. :first-letter - 가상 선택자  (0) 2013.10.01
14. :hover 링크 - 선택자  (0) 2013.10.01
13. :active - 링크 선택자  (0) 2013.10.01
12.visited - 링크 선택자  (0) 2013.10.01