Is it possible to set the equivalent of a src attribute of an img tag in CSS?

后端 未结 25 2564
借酒劲吻你
借酒劲吻你 2020-11-22 09:30

Is it possible to set the src attribute value in CSS? At present, what I am doing is:


25条回答
  •  醉梦人生
    2020-11-22 10:17

    Any method based on background or background-image is likely to fail when user prints the document with "print background colors and images" disabled. Which is unfortunately typical browser's default.

    The only print-friendly and cross-browser compatible method here is the one proposed by Bronx.

提交回复
热议问题