css - 在 Wordpress (CSS) 中重写 element.style

标签 css wordpress

我尝试在网站的移动版本中编辑 Logo 的高度。 我发现我需要移动高度为 50%,当我检查它时它显示 100%

    @media only screen and (min-width: 1000px)
    header.centered_logo .q_logo {
    height: 50% !important;


    .q_logo {
    height: 50% !important;
    <div class="q_logo"><a href="https://rzeczownik.com/" style="height: 60px; visibility: visible;"><img class="normal" src="https://rzeczownik.com/wp-content/uploads/2015/09/rzeczownik_logo.png" alt="Logo" style="height: 100%;"><img class="light" src="https://rzeczownik.com/wp-content/uploads/2015/09/rzeczownik_logo.png" alt="Logo" style="height: 100%;"><img class="dark" src="https://rzeczownik.com/wp-content/uploads/2015/09/rzeczownik_logo.png" alt="Logo" style="height: 100%;"><img class="sticky" src="https://rzeczownik.com/wp-content/uploads/2015/09/rzeczownik_logo.png" alt="Logo" style="height: 100%;"></a></div>

printscreen of the site / click

我尝试编辑 css 但没有成功。

最佳答案

您的代码显示了一个媒体查询,其样式将在最小宽度为 1000 像素时应用。

您应该将其更改为“最大宽度”。此外,CSS 似乎缺少一些花括号。

试试这个:

@media only screen and (max-width: 1000px) {
   .q_logo a img {
       height: 50% !important;
   }
}

关于css - 在 Wordpress (CSS) 中重写 element.style,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51177356/

相关文章:

html - 如何为 div 设置最小高度并使其仅在需要时拉伸(stretch)?

html - 为什么我的部分元素上的填充不起作用?

javascript - 由于不适当的 jquery,wordpress 子菜单无法切换

javascript - 具有不同高度和宽度的响应式图像网格

javascript - JQuery 下拉菜单在 WordPress WooCommerce 商店页面上不起作用

css - body 标签是否有一些控制其他元素的样式规则?

css - 这个图像按钮可以在 CSS 跨浏览器中重现吗?

css - 如何使用 Watir 在 div.style 标签中定位文本?

javascript - 如何让 Textarea 像 WordPress 一样工作

javascript - 我需要它在同一个窗口而不是在新窗口中打开