Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 임베디드
- br 태그
- reveal in file explorer
- tag html
- width속성
- i 태그
- iframe 태그
- 전체 선택자
- background-color 속성
- padding 속성
- iframe
- sub태그
- html tag i
- RGBA
- html 태그
- Live Server
- RGB
- 자식결합자
- go live
- not 의사클래스
- id 선택자
- focus 의사클래스
- css
- html
- Checked 의사 클래스
- 인접 형제 결합자
- 아두이노
- 일반 형제 결합자
- height속성
- sup태그
Archives
- Today
- Total
so woon!
[의사 클래스] Focus 의사 클래스(Pseudo Class) 본문
학습일 : 2022. 09. 05
Focus 의사 클래스
- Focus 의사 클래스(Pseudo Class)는 선택된 요소에 포커스(Focus)가 있을 때에 대한 의사 클래스이다.
- 다음과 같이 작성한다. ("는 없는 것으로 한다.)
"선택자":focus {
"속성" : "속성 값";
"속성" : "속성 값";
"속성" : "속성 값";
}
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<title>focus 의사 클래스</title>
<style>
body {
background-color: rgb(10,15,20);
color: rgb(245,250,255);
}
input {
background-color: rgb(20,25,30);
border: 0.0625rem solid rgb(30,35,40);
border-radius: 0.33rem;
color: rgb(245,250,255);
outline: none;
padding: 0.5rem 0.75rem;
}
input:hover {
background-color: rgb(25,30,35);
}
input:focus❤ {
background-color: red;
}
</style>
</head>
<body>
<input type="text">
</body>
</html>
=================실행결과=====================
'CSS > 개념정리' 카테고리의 다른 글
[속성] background-image 외 속성들 (0) | 2022.09.07 |
---|---|
[의사 클래스] Not 의사 클래스(Pseudo Class) (0) | 2022.09.07 |
[의사 클래스] first-of-type 및 nth-of-type, last-of-type 의사 클래스 (0) | 2022.09.07 |
[의사 클래스] first-child 및 nth-child, last-child 의사 클래스 (0) | 2022.09.07 |
[의사클래스] disabled 의사 클래스 (0) | 2022.09.07 |
Comments