LoginSignup
9
7

More than 5 years have passed since last update.

[メモ] [iOS Safari] linear-gradientでtransparentを指定したい

Posted at

CSSグラデーションで透明にしたいときは transparent ではなく rgba(x,x,x,0) を用いる。
'transparent'を指定するをiOS Safariグラデーションが機能しない。

/* NG */
background-image: linear-gradient(to right, #b2b2b2, transparent);

/* OK */
background-image: linear-gradient(to right, rgba(178,178,178,1),rgba(178,178,178,0));

透明度0のときの色はグラデーションに使用しているものを使う。

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