css - 在 Salient(Wordpress 主题)上个性化受密码保护的页面

标签 css wordpress forms wordpress-theming background-image

我正在尝试个性化我的投资组合主页,该主页受密码保护,并已在 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/

相关文章:

html - 在 CSS 中居中多个表格

html - 除页面外的DIV

div 上的 javascript-CSS 悬停问题

javascript - 使用 JavaScript 实时生成结果

javascript - jquery 删除不删除

css - 在移动设备上将静态导航栏更改为静态

css - 在 CSS 中指定用于打印的细线粗细

CSS 定义的样式并不总是位于代号一中

php - 从外部向 WordPress 插件的 PHP 文件添加函数(允许轻松更新版本)

javascript - 如何在表单提交时重定向页面