hide-if-contains-image

The hide-if-contains-image snippet hides any HTML element (or its ancestors) that match a CSS selector if they element background image matches a given pattern.

You can use hide-if-contains-image to hide elements based on a background image or the background image of any child element.

Parameters

Filter examples

The following table lists examples that use the hide-if-contains snippet:

Last updated