LoginSignup
1
2

More than 5 years have passed since last update.

safariでblurに対してoverflow:hiddenが効かない

Last updated at Posted at 2017-01-18

safariで子要素にblurをかけている際にoverflow:hiddenが効かなかったのでメモ。

Sample

.wrap要素にoverflow: hidden, .pctに対してblurをかけていますが、
safariではうまく動作していません。
そこで、.hack要素にtransform: translate(0)を指定することで解決できます。

.wrap {
  width: 100px;
  height: 100px;
  margin: 10px;
  overflow: hidden;
}

.pct {
  -webkit-filter: blur(4px);
  -ms-filter: blur(4px);
  filter: blur(4px);
}

.pct.hack {
  -webkit-transform: translate(0);
  -ms-transform: translate(0);
  transform: translate(0);
}
1
2
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
2