【问题标题】:why i can't link image and CSS and favicon in PHP为什么我不能在 PHP 中链接图像、CSS 和 favicon
【发布时间】:2021-09-12 04:55:10
【问题描述】:

我的 PHP 文件无法在 HTML 部分链接 CSS 或图像或网站图标我在 HTML 而非 PHP 中多次使用此代码,它完全有效我不知道我的代码有什么问题 我

<link rel="icon" type="image/ico" href="GoFixWare logo.ico"> <link rel="stylesheet" href="css/bootstrap">
<img class="d-block mx-auto mb-4" src="GoFixWare-logos_transparent.png" alt="" width="100" height="100">
<img src="img_bg-min.jpg" class="d-block mx-lg-auto img-fluid" alt="Bootstrap Themes" width="700" height="500"
            loading="lazy">

我正在使用 xampp

<link rel="stylesheet" href="css/bootstrap">
<link rel="icon" type="image/ico" href="GoFixWare logo.ico">

【问题讨论】:

标签: php html css


【解决方案1】:
<link rel="icon" type="image/ico" href="GoFixWarelogo.ico">

重命名你的图标,更多内容在这里href syntax : is it okay to have space in file name

【讨论】:

    【解决方案2】:

    尝试使用 src 代替链接标签中的 href

    【讨论】:

    • 你的css文件是在同一个文件夹中还是你在父文件夹中创建了一个css文件夹
    • 你上面的代码工作正常,如果我不正确,第二个代码就不行
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-12-13
    • 2012-01-07
    • 2021-09-21
    • 2010-10-15
    • 2017-11-22
    • 1970-01-01
    相关资源
    最近更新 更多