LoginSignup
1
1

More than 3 years have passed since last update.

リンク内にある擬似要素の画像をクリック出来るようにする

Posted at

これで解決:point_up:

擬似要素に
pointer-events: none;
を追加するだけ。

ページングで擬似要素に設定した画像がリンクされておらず、横や縦のサイズを変更しても解決出来ず・・・調べるとpointer-eventsをnoneにするだけで解決しました。

sample.css
.class test::after {
   position: absolute;
   top: 0;
   right: 0;
   content: url(/img/test.svg);
   pointer-events: none;
}

参考URL:https://design-soup.com/select-before

pointer-eventsについての説明はこの方が詳しく書かれていました。
https://qiita.com/ksk1015/items/c397181622d4ca6acceb

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