1
ifdef 2022 年 7 月 13 日
background-image 只是设置了背景图片,没有设置背景大小,需要再加一个 background-size: cover;
也可以用 background 的 shorthand: background: center / contain no-repeat url('xxxxxx'); |
2
wu67 2022 年 7 月 13 日
设置背景, 需要指定元素宽高和 background 的相关属性, 包括 size repeat
|
3
Rache1 2022 年 7 月 13 日
没看明白,不过,冷知识,CSS 里面 url 函数里面参数的引号是可选的。
<url> - CSS (层叠样式表) | MDN https://developer.mozilla.org/zh-CN/docs/Web/CSS/url |
5
xiaoruan OP 我这样子写却是错误的
试过将 image/index.png 的符合更换为\但是没区别 |