Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS minimum opacity value allowed

Tags:

css

opacity

In CSS when I change the opacity value of a button it is still clickable to an extent. I lowered my opacity setting down to 0.005 (so that the button is practically hidden, but it still works and can be interacted with), when I set the value to 0.000000000000000000000000000000000001 though, for example, it just becomes completely hidden and can no longer be clicked.

(Surely this tiny float is just rounded to 0, and this causes the problem, but I'm wondering, just because 0.005 works in my browser, doesn't mean it works in all browsers, and I NEED this button click-able in all browsers).

Does anyone know the minimum value it can tolerate across ALL browsers?

like image 704
Albert Renshaw Avatar asked Feb 11 '23 12:02

Albert Renshaw


1 Answers

Just as @zzzzbov mentioned: 0 is the minimum.

Note: Since 0 means "no opacity", it basically starts from 0.01

The least is

opacity: 0.01;

The most is:

 opacity: 0.99;
like image 159
Sleek Geek Avatar answered May 01 '23 13:05

Sleek Geek