【问题标题】:How do I change the link of an image using CSS如何使用 CSS 更改图像的链接
【发布时间】:2020-12-24 14:48:44
【问题描述】:

我在https://arvikamagasinet.com 有一个网站

顶部有一个标题图片/横幅,链接到原始主页。我想更改链接,以便标题图片链接到特定的 URL。

我需要使用 CSS 来编辑它。 WordPress 中没有内置函数来更改标题图像的 URL 链接。

提前致谢, 萨克斯

【问题讨论】:

  • 您不能使用 css 更改 html 链接。你需要修改wordpress模板。
  • CSS 用于样式,不能更改内容。

标签: css wordpress web url


【解决方案1】:

这件事很简单,你应该去你的WordPress主题文件夹wp-content然后你会发现header.php显示标题或者你可以在index.php中搜索它,你找到图像然后你会找到那个代码:

<a href="https://arvikamagasinet.com/" title="Arvikamagasinet" rel="home" class="header-image">
            <img src="https://arvikamagasinet.files.wordpress.com/2020/09/untitled-6-2.png" width="1250" height="400" alt="">
        </a>

你会将一个 href 更改为你的 ned 链接:


<a href="link here" title="Arvikamagasinet" rel="home" class="header-image">
            <img src="https://arvikamagasinet.files.wordpress.com/2020/09/untitled-6-2.png" width="1250" height="400" alt="">
        </a>

【讨论】:

    猜你喜欢
    • 2011-12-31
    • 2013-02-09
    • 2012-04-27
    • 1970-01-01
    • 2011-06-10
    • 1970-01-01
    • 1970-01-01
    • 2010-11-26
    • 2019-09-14
    相关资源
    最近更新 更多