51
49

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

前方, 後方, 部分一致セレクタ

Posted at

(バグあるけど)IE7 以上で使えるらしいのに、使ったことありませんでした。パフォーマンスは悪いらしいけど、便利そう。

前方一致

[attr^="val"] の型式。

a[href^="https"] {
  ...
}

後方一致

[attr$="val"] というふうに。

img[src$="png"] {
  ...
}

部分一致

[attr*="val"] な感じ。

a[href*="qiita.com"] {
  ...
}
51
49
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
51
49

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?