【发布时间】:2017-11-16 04:33:30
【问题描述】:
我已经有一段时间看不到我的标题图片了。我试图为移动设备和非移动设备设置单独的标题。我正在使用此代码(我现在使用 /**/ 将其放入 cmets 中)。
/* @media screen and (max-width: 600px) {
.custom-header { background: url("https://i2.wp.com/www.rosstheexplorer.com/wp-content/uploads/2017/05/Cover-Photo-Mobile-Test.jpg") no-repeat; width: 100%;
background-size:contain;
}
}
@media screen and (min-width: 601px) {
.custom-header { background: url("https://i1.wp.com/www.rosstheexplorer.com/wp-content/uploads/2017/02/Cover-Photo-6-2.jpg") no-repeat;
width: 100% ;
background-size:contain;
}
} */
我尝试恢复到更简单的方法,即自定义 -> 标题图像并以这种方式选择标题。那也不再起作用了。
我的 Bootstrap 代码似乎有问题,我对 Bootstrap 非常不熟悉,但被建议使用它。
我的网站是 www.rosstheexplorer.com
当设备宽度大于 601px 我希望发生以下情况
- 我不希望菜单和菜单之间有任何空间 自定义标题
- 我不想在上面有任何空间 客户标头
- 我不希望 H1、插件或页面上的任何其他内容与客户标题重叠
- 我不希望客户标题的左侧或右侧有任何空白
- 我希望始终能够看到整个文本'Ross The Explorer',我 不希望最后一个 R 被删除
在 header.php 我有
<?php wp_head(); ?>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</head>
我尝试删除以下代码以查看是否会产生影响,但我的标题仍然没有加载。
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
谁能给点建议?
【问题讨论】:
-
值得注意的是,您应该将 wp_enqueue 用于脚本和样式,而不是 header.php 文件中的标签