我正在尝试个性化我的投资组合主页,该主页受密码保护,并已在 Wordpress 中构建,并带有 Salient 主题 ( http://federicaaradelli.com/)。
我只设法向密码表单添加了一些边距和填充,但我无法更改页面背景颜色或添加背景图像。
这就是我在个性化 CSS 中写的内容:
.post-password-form {
margin-top: 20%;
}
.post-password-form {
padding:10px;
background-color: white;
}
我也尝试过检查页面/元素,但它并没有真正让我到任何地方。
有谁知道如何解决这个问题?
谢谢! 费德里卡
最佳答案
将此添加到您的 CSS:
.container-wrap {
background-color: yellow !important; /* Generally, you don't need
to use "!important" in
your CSS, but currently
there is some overwriting
in your code and I use
"!important" as a quick
fix.
*/
background-image: url(https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png);
/* Optionally: */
background-repeat: no-repeat;
background-size: 100%; /* Sometimes it would be better to
use "cover" instead of "100%",
but in your case "100%" is the
best option.
*/
}
关于css - 在 Salient(Wordpress 主题)上个性化受密码保护的页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51582327/