Differences between css selectors

[attribute ~ = value] is used to select the element that contains the specified vocabulary in the attribute value.
[attribute * = value] matches each element that contains the specified value in the attribute value.

p [class ~ = "lone"]
p [class * = "lone"]

there seems to be no difference between the two, huh?

Apr.18,2021

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Test</title>
  <style type="text/css">
    p[class ~= "lone"]{
      color: red;
    }
    p[class *= "abc"]{
      color: blue;
    }
  </style>
</head>
<body>
  <p class="lone">lone: 

<p class="abc">abc:

<p class="lone1">lone1:

<p class="abc1">abc1:

</body> </html>

one contains a word , and the other contains a string that is different

.

[attribute~=value] matches any entry in a space-delimited list. It matches attribute= "a valueb", but not attribute= "a valueb".

[attribute*=value] matches any substring. It matches attribute= "a valueb" and attribute= "a valueb", but not attribute= "x".


specify vocabulary ! = specify value

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eac507-5cee2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eac507-5cee2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?