【问题标题】:How to add URL of GIF and SVG in CSS file of WordPress?如何在 WordPress 的 CSS 文件中添加 GIF 和 SVG 的 URL?
【发布时间】:2017-04-16 13:53:59
【问题描述】:

例如,我尝试了以下代码,但它们都不起作用:

background-image: url("images/components/arrows.svg");

background-image: url("./images/components/arrows.svg");

background-image: url("../images/components/arrows.svg");

【问题讨论】:

    标签: css wordpress url svg gif


    【解决方案1】:

    看起来你正在寻找这个......

       background-image: url("//images/components/arrows.svg");
    

    【讨论】:

    • @L.Leo 去掉 url() 中的撇号background-image: url(//images/components/arrows.svg);
    • 这是标准格式background-image: url(http://example.com/example.svg) 就这样试试吧,如果不行,还有别的办法。
    • @I Love CSS 刚刚解决了background-image: url(../images/components/arrows.svg);的问题,感谢您的帮助!
    猜你喜欢
    • 2012-12-26
    • 1970-01-01
    • 2018-12-06
    • 1970-01-01
    • 2021-06-10
    • 2018-11-30
    • 2016-11-01
    • 1970-01-01
    • 2014-02-09
    相关资源
    最近更新 更多