首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >调整移动设备标题图像的大小

调整移动设备标题图像的大小
EN

Stack Overflow用户
提问于 2018-01-11 07:38:41
回答 1查看 199关注 0票数 0

我一直在尝试为我的WordPress博客设置一个标题图像,但由于图像变小,我无法让它在小屏幕上正常工作。

此外,当您单击移动版本上的菜单时,图像也会下降。

代码语言:javascript
复制
<header id="masthead" class="site-header" style="background-image: url(<?php header_image(); ?>);background-repeat:no-repeat; background-size:contain; background-position:center;">

.site-branding {
      padding: 85px 0;
    }

header.site-header{
        margin-bottom: 40px;
    }

下面是供参考的博客:http://semdesculpas.org/

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-01-11 14:16:01

您可以设置site-branding的背景。

代码语言:javascript
复制
    <div class="site-branding  row text-center" style="background-image: url(http://semdesculpas.org/wp-content/uploads/2018/01/cropped-cropped-Untitled-1-1-1-2.png);background-repeat:no-repeat;
background-size:contain;
background-position:center; margin-top: 20px">

结果:

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48197820

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档