当前位置:网站首页>5. Attribute selector
5. Attribute selector
2022-06-13 08:41:00 【zhengqiqiqinqin】
The following common HTML Code
<p title="abc"> This is the first one p</p>
<p title="abcd"> This is the second p</p>
<p title="hello"> This is the third p</p>
<p> This is the fourth p</p>
<div title="abc"> This is a div Contents of Li </div>One 、 Attribute selector Syntax 1:[ Property name ] Select the element with the specified attribute .
CSS Code :
/*
[ Property name ] Select the element with the specified attribute .
*/
[title]{
color: red;
}Running results :

Two 、 Attribute selector Syntax 2:[ Property name = Property value ] Select the element that contains the specified attribute and attribute value
CSS Code :
/*
[ Property name = Property value ] Select the element that contains the specified attribute and attribute value
*/
[title=abc]{
color: red;
} Running results :

3、 ... and 、 Attribute selector Syntax 3:[ Property name ^= Property value ] Select the element whose attribute value begins with the specified value
CSS Code :
/*
3 [ Property name ^= Property value ] Select the element whose attribute value begins with the specified value
*/
[title^=abc]{
color: red;
}Running results :

Four 、 Attribute selector Syntax 4:[ Property name $= Property value A] Select attribute value to attribute value A Ending element
CSS Code :
/*
4 [ Property name $= Property value ] Select the element whose attribute value ends with the specified value
*/
[title$=c]{
color: red;
}Running results :

5、 ... and 、 Attribute selector Syntax 5:[ Property name *= Property value A] Select include attribute value as attribute value A All attribute elements of
CSS Code :
/*
5 [ Property name *= Property value ] Select all elements with a certain value in the attribute value
*/
[title*=e]{
color: red;
}Running results :

边栏推荐
- JS to download files in batches
- 8、 JS data type conversion
- Microservice Project Construction II: database design
- 1、 JS introduction
- filebeat采集日志到ELK
- Dest0g3 520迎新赛
- JS to get the date in the next seven days of the current date
- About redis encapsulation tool class using distributed locks
- Redis subscribe connection timeout interrupt problem solution
- 浅析Visual Studio 使用
猜你喜欢

MySQL installation and configuration under Windows

redis. exceptions. ConnectionError: Error 111 connecting to 172.16.8.128:6379. Connection refused.

Guidance process and service control

Phpexcel 10008 error resolution

Disk management and disk partition operation
![WARNING:tornado.access:404 GET /favicon.ico (172.16.8.1) 1.84ms [附静态文件设置]](/img/6d/6eef1f0ebcab45e9a209a3b6c62b03.png)
WARNING:tornado.access:404 GET /favicon.ico (172.16.8.1) 1.84ms [附静态文件设置]

0. Quelques doutes au sujet de SolidWorks

Container concept and cloud native

Process and scheduled task management

Buffer Overflow Vulnerability Lab
随机推荐
Bidirectional retransmission step experiment
JS - max. of array cases
JS array method
JS wrapper object
0. some doubts about learning SolidWorks for the first time
1、 JS introduction
Mobile terminal development I: basic concepts
0.一些自己初學Solidworks的疑惑
JS to download files in batches
Namespace in TS (2)
Vscode define code block -- define cursor position
2、 Three ways to write JS code
0. Quelques doutes au sujet de SolidWorks
DHCP principle and configuration
When submitting the laravel admin form and using the required verification, an error is reported when the value is 0
[notes] like the solution to the problem of slow query (index + explicitly specifying query fields)
Document contains question type
HCIP_ MGRE experiment
Differences among let, VaR and const when JS declares variables
Penetration problem (main directory, password explosion, database uploading Trojan horse)