WordPress标题背景图像问题


Wordpress Header Background Image Issue

经过几个小时的尝试,我来到这里寻求帮助(我是编码初学者)。

我想只在标题中放置全宽和全高背景图像。网站在这里: http://www.coveragenewstv.com/

这是标题.php :

<head>
<title><?php wp_title('|', true, 'right'); ?></title>
<meta charset="<?php bloginfo( 'charset' );?>" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php
wp_head(); /** we hook up in wp_booster @see td_wp_booster_functions::hook_wp_head */
?>
</head>
<body <?php body_class() ?> itemscope="itemscope" itemtype="<?php echo td_global::$http_or_https?>://schema.org/WebPage">
<?php //this is closing in the footer.php file ?>
<?php /* scroll to top */?>
<div class="td-scroll-up"><i class="td-icon-menu-up"></i></div>
<div id="td-outer-wrap">
<div class="td-transition-content-and-menu td-mobile-nav-wrap">
    <?php locate_template('parts/menu-mobile.php', true);?>
</div>
<?php //this is closing in the footer.php file ?>
<div class="td-transition-content-and-menu td-content-wrap">
<?php
td_api_header_style::_helper_show_header();
do_action('td_wp_booster_after_header'); //used by unique articles

在 css 文件的底部添加两个代码块:

.td-banner-wrap-full, .td-header-menu-wrap-full {
    background-color: transparent;
}

.td-header-wrap.td-header-style-1 {
    background-image: url(http://www.joomlaworks.net/images/demos/galleries/abstract/7.jpg);
    background-size: cover;
}

将网址替换为背景图片网址。

请参阅:工作正常