CSS for only some background cards

Here is an example.
you can change the background picture based on a value or the like.
you can also use several different images for different cases.

The trick is to have an empty image to display if the condition is not met.
I made a 10x10px transparent image.

For the background image (100% box), I made a 30x30px with an opacity of 30%, then you have to experiment to find the right color and the right opacity.

CSS is then very simple (see the demo application)

Do not use my links to the images directly, as I may delete them from my account!

Demo Application

8 Likes