LoginSignup
7
6

More than 5 years have passed since last update.

擬似要素のプロパティを取得してみよう

Posted at
w = document.defaultView.getComputedStyle($('#hoge')[0],'::after').getPropertyValue('width');

も少しなんとかならないかと思ったがどうにもならないぽい。
みんな大好き .css() は内部的に getComputedStyle() を使っているらしいけど、擬似要素には対応していない? みたい。

しかしこうなるともはやjQuery使うだけ無駄。

7
6
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
7
6