SquareSpace:更改部分背景颜色(Eamon / Ethan模板)

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

示例模板:https://eamon-demo.squarespace.com/#overview-eamon

有没有办法在Ethan / Eamon主题中用文本更改单个白色部分的背景颜色?我没有运气

<style>
.body { 
background-color: lightblue; 
}
</style>

在页面编辑器的“高级”部分中。我期待只更改部分背景颜色之一,我不想全部改变它们。谢谢。

解!我能够使它在名为“titles”的部分上工作,将以下内容添加到CSS编辑器中:

section#titles { 
background-color: lightblue !important; 
}
css background-color squarespace
1个回答
0
投票

是的,可以通过CSS attribute selector进行定位。例如:

[data-url-id='titles-eamon'] .content, [data-url-id='titles-eamon'] .content-inner {
    background-color: lightblue !important;
}

上面的代码将通过CSS Editor插入。 data-url-id值对应索引页面部分的URL Slug(参见图像)。

您可以检查页面用户browser's developer tools的代码(通常通过按F12或CTRL + SHIFT + I)。这将帮助您探索此页面的代码以及其他类似问题/自定义。

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.