CSS opacity not working in iOS

I was having a problem where adding a basic css opacity on an element wouldn’t work when viewing in iOS. Looked fine on desktop.

I didn’t come across a specific solution to my problem, but someone else had a similar thing when using opacity with transitions.

The solution

Try adding visibility: visible to the element.

.element {
    background-color: red;
    opacity: 0.6;
    visibility: visible;

Tags: ,

2 Responses to “CSS opacity not working in iOS”

  1. vijay says:

    Thanks, its working for me

  2. qq8788 says:

    Bagus dan bermanfaat. Admin bales dong, please hehe.

Leave a Reply