Cải thiện bài viết
Lưu bài viết
Cải thiện bài viết
Lưu bài viết
Đọc[attribute*=”str”] Selector: The [attribute*=”str”] selector is used to select that elements whose attribute value contains the specified sub string str. This example shows how to use a wildcard to select all div with a class that contains str. This could be at the start, the end or in the middle of the class.
Syntax:
[attribute*="value"] { // CSS property }
Example:
Bàn luận
Bộ chọn ký tự đại diện được sử dụng để chọn nhiều yếu tố đồng thời. Nó chọn loại tên lớp hoặc thuộc tính tương tự và sử dụng thuộc tính CSS. * Wildcard còn được gọi là chứa ký tự đại diện. [Thuộc tính*= STR STR] Bộ chọn: Bộ chọn [thuộc tính*= Tiết Str]] được sử dụng để chọn các phần tử có giá trị thuộc tính chứa chuỗi chuỗi con được chỉ định. Ví dụ này cho thấy cách sử dụng ký tự đại diện để chọn tất cả Div với một lớp có chứa str. Điều này có thể ở đầu, kết thúc hoặc ở giữa lớp. & Nbsp;
[attribute^="str"] { // CSS property }1
[attribute^="str"] { // CSS property }5
[attribute^="str"] { // CSS property }6
[attribute^="str"] { // CSS property }7
[attribute^="str"] { // CSS property }8
[attribute^="str"] { // CSS property }5
[attribute$="str"] { // CSS property }0
[attribute$="str"] { // CSS property }1
[attribute$="str"] { // CSS property }2
[attribute$="str"] { // CSS property }1
[attribute$="str"] { // CSS property }4
[attribute^="str"] { // CSS property }5
[attribute$="str"] { // CSS property }6
[attribute^="str"] { // CSS property }5
[attribute$="str"] { // CSS property }8
[attribute$="str"] { // CSS property }1
0[attribute^="str"] { // CSS property }5
[attribute$="str"] { // CSS property }6
[attribute^="str"] { // CSS property }5
4[attribute$="str"] { // CSS property }1
6[attribute$="str"] { // CSS property }1
8[attribute^="str"] { // CSS property }5
[attribute$="str"] { // CSS property }6
[attribute^="str"] { // CSS property }1
HTML
‘
[attribute^="str"] { // CSS property }1
1 >
2>
1>
[attribute^="str"] { // CSS property }1
1 >
8>
1>
Output:
[attribute^="str"] {
// CSS property
}
11
4>
1>
The
[attribute^=”value”] selector is used to select those elements whose attribute value begins with a specified value str. This example shows how to use a wildcard to select all div with a class that starts with str.
Syntax:
[attribute^="str"] { // CSS property }
Example:
Bàn luận
[attribute^="str"] { // CSS property }1
Bộ chọn ký tự đại diện được sử dụng để chọn nhiều yếu tố đồng thời. Nó chọn loại tên lớp hoặc thuộc tính tương tự và sử dụng thuộc tính CSS. * Wildcard còn được gọi là chứa ký tự đại diện. [Thuộc tính*= STR STR] Bộ chọn: Bộ chọn [thuộc tính*= Tiết Str]] được sử dụng để chọn các phần tử có giá trị thuộc tính chứa chuỗi chuỗi con được chỉ định. Ví dụ này cho thấy cách sử dụng ký tự đại diện để chọn tất cả Div với một lớp có chứa str. Điều này có thể ở đầu, kết thúc hoặc ở giữa lớp. & Nbsp;
[attribute$="str"] { // CSS property }1
[attribute$="str"] { // CSS property }2
[attribute$="str"] { // CSS property }1
[attribute$="str"] { // CSS property }4
[attribute^="str"] { // CSS property }5
[attribute$="str"] { // CSS property }6
[attribute^="str"] { // CSS property }5
[attribute$="str"] { // CSS property }8
[attribute$="str"] { // CSS property }1
0[attribute^="str"] { // CSS property }5
[attribute$="str"] { // CSS property }6
[attribute^="str"] { // CSS property }5
4[attribute$="str"] { // CSS property }1
6[attribute$="str"] { // CSS property }1
8[attribute^="str"] { // CSS property }5
[attribute$="str"] { // CSS property }6
[attribute^="str"] { // CSS property }1
[attribute^="str"] { // CSS property }1
HTML
‘
[attribute^="str"] { // CSS property }1
1 >
2>
1>
[attribute^="str"] { // CSS property }1
1 >
8>
1>
Output:
[attribute^="str"] { // CSS property }1
1
4>
1>
[attribute$=”str”]
Selector: The [attribute$=”value”] selector is used to select those elements whose attribute value ends with a specified value str. The following example selects all elements with a class attribute value that ends with str. Syntax:
[attribute$="str"] { // CSS property }
Example:
Bàn luận
Bộ chọn ký tự đại diện được sử dụng để chọn nhiều yếu tố đồng thời. Nó chọn loại tên lớp hoặc thuộc tính tương tự và sử dụng thuộc tính CSS. * Wildcard còn được gọi là chứa ký tự đại diện. [Thuộc tính*= STR STR] Bộ chọn: Bộ chọn [thuộc tính*= Tiết Str]] được sử dụng để chọn các phần tử có giá trị thuộc tính chứa chuỗi chuỗi con được chỉ định. Ví dụ này cho thấy cách sử dụng ký tự đại diện để chọn tất cả Div với một lớp có chứa str. Điều này có thể ở đầu, kết thúc hoặc ở giữa lớp. & Nbsp;
[attribute^="str"] { // CSS property }5
[attribute^="str"] { // CSS property }92
[attribute$="str"] { // CSS property }1
[attribute$="str"] { // CSS property }2
[attribute$="str"] { // CSS property }1
[attribute$="str"] { // CSS property }4
[attribute^="str"] { // CSS property }5
[attribute$="str"] { // CSS property }6
[attribute^="str"] { // CSS property }5
[attribute$="str"] { // CSS property }8
[attribute$="str"] { // CSS property }1
0[attribute^="str"] { // CSS property }5
[attribute$="str"] { // CSS property }6
[attribute^="str"] { // CSS property }5
4[attribute$="str"] { // CSS property }1
6[attribute$="str"] { // CSS property }1
8[attribute^="str"] { // CSS property }5
[attribute$="str"] { // CSS property }6
[attribute^="str"] { // CSS property }1
[attribute^="str"] { // CSS property }1
HTML
‘
[attribute^="str"] { // CSS property }1
1 >
2>
1>
8
>
1>
[attribute^="str"] { // CSS property }1
1
4>
1>