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

后端 未结 25 2195
借酒劲吻你
借酒劲吻你 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:15

    i used the empty div solution, with this CSS:

    #throbber {
        background-image: url(/Content/pictures/ajax-loader.gif);
        background-repeat: no-repeat;
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
    }
    

    HTML:

提交回复
热议问题