css - 我的网站标题图片未在移动设备上调整大小

标签 css header resize blogger responsive

我正在使用 blogger 并有一个自定义模板我添加了一个标题它工作正常但标题未在移动模板上调整大小 我的网站是https://untoldstoriesofpakistan.blogspot.com

我认为这是我的标题 css

标题

div#navigation-wrapper {
width: 56%;
float: right;
}
#header {
width: 30%;
background-size: contain;
}
#logo {
text-align:center;
padding:0px 0;
height: 10px;
 background-size: contain;
}

这是我的媒体 CSS

@media only screen and (max-width: 767px) {

    .container {
        width:300px;
    }

    #navigation-wrapper {
        display:none;
    }

    .slicknav_menu {
        display:block;
    }

    #logo img {
        max-width:300px;
        height:auto;
    }

    .post-header h1 a, .post-header h2 a, .post-header h1 {
        font-size:22px;
        letter-spacing:2px;
    }

    .post-image img {
        width:300px;
        height:auto;
    }

    .post-image.audio iframe {
        width:300px;
        height:auto;
    }

    .item-related {
        width:320px;
        margin-bottom:30px;
    }

    .share-box {
        width:46px; 
        height:36px; 
        line-height:36px;
        margin:0 4px;
    }

    .post-pagination .prev-post {
        width:300px;
    }
    .post-pagination .next-post {
        width:300px;
    }

    #respond textarea {
        width:90%;
    }

    .thecomment .author-img {
        display:none;
    }

    #widget-area .widget, #sidebar .widget {
        width:300px;
        margin-right:32px;
        float:left;
        margin-bottom:35px;
    }

    #footer-logo img {
        max-width:300px;
        height:auto;
    }

    #footer-social a i {
        height:28px;
        width:28px;
        line-height:28px;
        margin-right:0;
        font-size:12px;
    }
    #footer-social a {
        margin:0 5px;
    }
    #footer-social a span{
        display:none;
    }

    .wpcf7 textarea {
        width:94%;
    }

    .sp-grid li {
        width:320px;
    }
    .sp-grid li:nth-child(3n+3) {
        margin-right:0;
    }
    .sp-grid li:nth-child(2n+2) {
        margin-right:0;
    }

    .container.sp_sidebar #main {
        width:300px;
        margin-right:0;
    }
    .container.sp_sidebar #sidebar {
        width:300px;
    }

        .container.sp_sidebar #sidebar .widget {
            width:300px;
        }

    .container.sp_sidebar .item-related {
        width:300px;
        margin-bottom:30px;
    }


    .col-md-6.site-top-menu-right.text-right {
    display: none;
    }





    div#sidebar-narrow {
    display: none;
    }

    div#main-part {
    float: left;
    width: 310px;
    }

    }

最佳答案

您需要更改标题图像大小。在您的代码中搜索

@media only screen and (max-width: 767px) and (min-width: 480px){
  #logo img {
     max-width: 480px;
        height: auto;
     }
  }

@media only screen and (max-width: 767px) {
    #logo img {
        max-width: 300px;
        height: auto;
     }
  }

img#Header1_headerimg {
      width: 180px;
      height: 55px;
      float: left;
 }

并将其替换为

img#Header1_headerimg {
    width: auto;
    height: 50px;
    float: left;
}

关于css - 我的网站标题图片未在移动设备上调整大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40742100/

相关文章:

html - 为什么 Chrome 开发工具中的元素大小工具提示和计算样式大小不同?

css - 我如何更正我的响应式媒体查询?

html - 同时悬停 2 个 div

html - 将标题按钮居中而不使其成为静态/绝对

java - 如何调整 JTextField 的大小?

javascript - 如何自动调整弹出窗口或模式对话框的大小以进行内容更改

C# 改变按钮文本的大小

html - 对齐内容 - 在 bootstrap 中的导航栏内

php - 如何修复PHP中的“ header 已发送”错误

c++ - 强制执行/定义函数声明