cssopacity

CSS minimum opacity value allowed


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?


Solution

  • 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;