Using relative URL in CSS file, what location is it relative to?

前端 未结 8 2289
名媛妹妹
名媛妹妹 2020-11-22 03:29

When defining something like a background image URL in a CSS file, when using a relative URL, where is it relative to? For example:

Suppose the file /styleshe

8条回答
  •  鱼传尺愫
    2020-11-22 03:50

    For CSS style sheets, the base URI is that of the style sheet, not that of the source document.

    (Anything else would be broken, IMNSHO)

提交回复
热议问题