element[attribute$=value]





css/style.css
  • input[value$=sea]{
  •  background-color: #FFFFCC;
  • }
input[value$=sea]{
 background-color: #FFFFCC;
}


index.html
  • <!DOCTYPE html>
  • <html>
  • <head>
  •  <meta charset="utf-8" />
  •  <title>New Page</title>
  •  <link href="css/style.css" rel="stylesheet" />
  • </head>
  • <body>
  •  <input type="text" value="sea" />
  •  <br />
  •  <br />
  •  <input type="text" value="sea-man" />
  •  <br />
  •  <br />
  •  <input type="text" value="man of a sea" />
  •  <br />
  •  <br />
  •  <input type="text" value="I saw a sea yesterday" />
  •  <br />
  •  <br />
  •  <input type="submit" name="ok" value="OK" />
  • </body>
  • </html>
  • <!DOCTYPE html>
  • <html>
  • <head>
  •  <meta charset="utf-8" />
  •  <title>New Page</title>
  •  <link href="css/style.css" rel="stylesheet" />
  • </head>
  • <body>
  •  <input type="text" value="sea" />
  •  <br />
  •  <br />
  •  <input type="text" value="sea-man" />
  •  <br />
  •  <br />
  •  <input type="text" value="man of a sea" />
  •  <br />
  •  <br />
  •  <input type="text" value="I saw a sea yesterday" />
  •  <br />
  •  <br />
  •  <input type="submit" name="ok" value="OK" />
  • </body>
  • </html>