0
0

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.

background-colorのrgbaが機能しなかった時、意外な見落とし

Posted at

background-colorのrgbaが機能していないという指摘をもらった。しかし、自分の環境( mac os & Google Chrome, ios & safari )では見えている。

最初に思いついたのが「ベンダープレフィックスかな?」と。けれど、 can i use で確認したところ、そうではなさそうだ。https://caniuse.com/#search=rgba

そこで検索したところ、この記事( css - rgba is not working, when i had it working 5 minutes ago - Stack Overflow )にたどり着いた。要は、「余計なスペースが入っている」とのこと。

そこで自分のソースコードを確認。すると、

background-color: rgb(106, 52, 29, 0.5);

こうなっていた。rgbaのaがなかった。

よくこれで表示されていたな。むしろ描画して欲しくないな。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?