Selector (E: hover/E: active/E: Focus)

Source: Internet
Author: User

<! 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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.