Is quoting the value of url() really necessary?

后端 未结 7 2055
情话喂你
情话喂你 2020-11-22 09:40

Which of the following should I use in my stylesheets?

/* Example #1: */ background-image: url(image.png);
/* Example #2: */ background-image: url(\"image.pn         


        
7条回答
  •  一整个雨季
    2020-11-22 10:19

    According to Google CSS Coding Style

    Do not use quotation marks in URI values (url()).

    Exception: If you do need to use the @charset rule, use double quotation marks—single quotation marks are not permitted.

提交回复
热议问题