:enabled
Baseline
Widely available
This feature is well established and works across many devices and browser versions. Itâs been available across browsers since 2015ë 7ì.
CSS :enabled ìì¬ í´ëì¤ë 모ë íì± ìì를 ëíë
ëë¤. íì± ììë íì±(ì í, í´ë¦, ì
ë ¥ ë±ë±)íê±°ë í¬ì»¤ì¤ë¥¼ ë°ì ì ìë ìì를 ë§í©ëë¤. ë°ë ìíì¸ ë¹íì± ììë ì¡´ì¬í©ëë¤.
css
/* 모ë íì± <input> ì í */
input:enabled {
color: blue;
}
구문
Error: could not find syntax for this itemìì
ë¤ì ìì ë 모ë íì± í
ì¤í¸ ë° ë²í¼ <input>ì ê¸ì ìì ì´ë¡ìì¼ë¡ ë§ë¤ê³ , ë¹íì± ìíë íìì¼ë¡ ë§ëëë¤. ì´ë° 구ë¶ì íµí´ ì¬ì©ìë ìí¸ìì© ê°ë¥í ìì를 ì½ê² 구ë³í ì ììµëë¤.
HTML
html
<form action="url_of_form">
<label for="FirstField">First field (enabled):</label>
<input type="text" id="FirstField" value="Lorem" /><br />
<label for="SecondField">Second field (disabled):</label>
<input type="text" id="SecondField" value="Ipsum" disabled="disabled" /><br />
<input type="button" value="Submit" />
</form>
CSS
css
input:enabled {
color: #2b2;
}
input:disabled {
color: #aaa;
}
ê²°ê³¼
ëª ì¸
| Specification |
|---|
| HTML> # selector-enabled> |
| Selectors Level 4> # enabled-pseudo> |