内部标题图像不会更改

  • 本文关键字:标题 图像 内部 css
  • 更新时间 :
  • 英文 :


标题内部图像没有改变,例如当你在底部编辑页面时是标题图像我上传了它,但图像没有改变 链接

内部标题图像的代码

.inner-page-banner {
background: url(images/inner-page/1.jpg) no-repeat center;
background-attachment: fixed;
background-size: cover;
position: relative;
z-index: 9;

这是背景图片网址(images/inner-page/1.jpg(,我想要每个页面的图片,但我无法更改它。
设置截图

如果你想为每个页面使用不同的标题图像,你可以在HTML中inner-page-bannerdiv之后手动设置不同的图像路径,或者在CSS中创建具有background-image属性的类,然后将类应用于HTML中的div。

仅在 HTML 中设置背景:

在您的 HTML 文件中,找到inner-page-bannerdiv。 使用图像路径添加background-image属性,如下所示:

<div class="inner-page-banner" style="background-image: url('/path/of/your/image.png')"; >
// content
</div>

使用 CSS 设置背景:

或者,您可以通过创建设置背景图像的图像类在 CSS 中执行此操作,您只需在标头div 中定义此类。

.CSS:

.image1 {
background-image: url('/path/of/your/image1.png') no-repeat center;
}
.image2 {
background-image: url('/path/of/your/image2.png') no-repeat center;
}

并引用 HTML 文件中div 的图像类之一。

.HTML:

<div class="inner-page-banner image1"; >
// content
</div>

注意:如果您不想再使用该图像,则需要删除 CSS 中inner-page-banner类所在的背景属性,并继续使用这些方法之一。

请在此处提及完整路径,例如

背景:网址(http://yoursitename/images/inner 页/1.jpg(无重复中心;

最新更新