使背景图像页面具体化

问题描述 投票:0回答:1

我目前正在为我的网站使用Squarespace平台,我正在尝试更改我的主页的背景图片,在搜索了一些论坛并查看我的website的源代码后,我被告知id #collection-51648018e4b0d7daf0a7cece只会改变主页,但当代码

#collection-51648018e4b0d7daf0a7cece {
  background-image: url('image-location.png');
}

添加没有任何反应,但通过使用此代码

#navigator {
  background-image: url('image-location.png');
}

它确实发生了变化,但将其应用于我的所有页面。有人知道解决这个问题吗?我甚至向Squarespace提交了一张票,但他们根本没有帮助。此外,请注意我无法更改网站的实际代码,因为它是Squarespace。我只能添加自定义CSS或将代码注入<head>标签

html css background-image squarespace
1个回答
0
投票

使#navigator选择器特定于主页:

#collection-51648018e4b0d7daf0a7cece #navigator {
  background-image: url('image-location.png');
}

编辑:根据您的代码,您可能想要这样:

#collection-51648018e4b0d7daf0a7cece #navigator {
  background: #fff url('image-location.png') scroll no-repeat top right;
}
© www.soinside.com 2019 - 2024. All rights reserved.