You will eventually be able to use
background-image: attr(data-image-src url);
but that is not implemented anywhere yet to my knowledge. In the above, url
is an optional “type-or-unit” parameter to attr()
. See https://drafts.csswg.org/css-values/#attr-notation.
More Related Contents:
- How to apply a CSS filter to a background image
- Using percentage values with background-position on a linear-gradient
- How do I combine a background-image and CSS3 gradient on the same element?
- Can I have multiple background images using CSS?
- CSS3 background image transition
- Responsive css background images
- Semi-transparent color layer over background-image?
- How to reference JSF image resource as CSS background image url
- Select elements by attribute in CSS
- How can I force browsers to print background images in CSS?
- Changing Background Image with CSS3 Animations
- Is embedding background image data into CSS as Base64 good or bad practice?
- How to add a color overlay to a background image? [duplicate]
- IE 8: background-size fix [duplicate]
- CSS background-size: cover + background-attachment: fixed clipping background images
- How to rotate the background image in the container?
- How to scale CSS sprites when used as background-image?
- Google Chrome Extensions – Can’t load local images with CSS
- Disable antialising when scaling images [duplicate]
- Google chrome a:visited background image not working
- CSS blur on background image but not on content [duplicate]
- Symfony2 – Assetic – load images in CSS
- Background images: how to fill whole div if image is small and vice versa
- Overlay a background-image with an rgba background-color
- Animate CSS background-position with smooth results (sub-pixel animation)
- Full background image with fade effect
- CSS: background image does not fill when scrolling
- How can I use a data attribute to set a background-image in CSS?
- CSS background image URL failing to load
- Issues with “background-position” in “background” shorthand property