This article mainly introduces the usage of the header selector in jQuery and analyzes the functions, definitions, and usage skills of the header selector in the form of examples. It has some reference value, for more information about how to use the header selector in jQuery, see the following example. Share it with you for your reference. The specific analysis is as follows:
This selector can match the title element (h1-h6 ).
Syntax structure:
The Code is as follows:
$ (": Header ")
This selector should also be used with other selectors, such as class selector and element selector. For example:
The Code is as follows:
$ (". Qiantai: header" ).css ("color", "blue ")
The above Code sets the font color in the title element named qiantai to blue.
If it is not used with other selectors, the default state is to use with the * selector. For example, $ (": header") is equivalent to $ ("*: header ").
Instance code:
Instance 1:
The Code is as follows:
Foot home