Currently, I am attempting to target img tags based on the alt attribute in order to correctly load a background-image on mobile devices.
The issue I am encountering is that regardless of the combination of attribute selectors I use, it does not seem to work. I am unable to select the specific tag I intend to with these selectors.
I have tried the following:
img[alt="Chelo Kebab"] {opacity: 0.5}
img[alt*="Chelo Kebab"] {opacity: 0.5}
img[alt^="Chelo Kebab"] {opacity: 0.5}
I have experimented with all possible combinations, including variations in capitalization. Additionally, I attempted:
img[alt] {opacity: 0.5}
Yet, unfortunately, none of these methods have been successful for me. I even tried adding the parent class name before img.
You can view the code I am working on at this address: here
My objective is to target each individual img tag.
Here is evidence that my syntax is accurate: https://i.sstatic.net/VJvFB.png
UPDATE: It has become clear that this is a caching problem that I am currently working to resolve.