<! Doctype HTML>
<HTML xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>
<Title> </title>
<Style type = "text/CSS">
Input [type = text]: hover {
Background-color: limegreen;
}
Input [type = text]: Active {
Background-color: skyblue;
}
Input [type = text]: Focus {
Background-color: #00ff90;
}
</Style>
</Head>
<Body>
<! -- E: hover
The selector is used to specify the style used by the element when the mouse pointer moves over the element. The method is as follows:
<Element>: hover
{
// Specify the style.
}
-->
<! -- E: Active
The selector is used to specify the style used when the element is activated (that is, when the element is not released. -->
<! -- E: Focus
The selector is used to specify the style used when an element obtains the focus. -->
<Form>
<P> name: <input type = "text" name = "name"/> </P>
<P> address: <input type = "text" name = "Address"/> </P>
</Form>
</Body>
</Html>
The effect is as follows:
Selector (E: hover/E: active/E: Focus)