0
1

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.

svgを使って、html要素をmask / clipする

Posted at

※ はてなブログから技術ネタを移動しました
※ 初稿:2017/03/17

<style>
.clipping-target {
  width: 100%;
  height: 100%;
  mask: url(./mask.svg) no-repeat 50% 50%;
}
</style>
<div class="clipping-target">
Yo!
</div>

などと, maskしたり, clip-path css propertyでclipさせたりできるのだが、
IE 11では動かない! 別の手段を使いましょう。
svgでsvgの要素をclipするのはIEでもできるみたいです。svgをhtml要素に作用させるのが不可みたい。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?