为什么我的png不显示在我的网页网站



我已经使用"Starter site "模板启动了我的asp.net WebPages站点。它包含一个布局页面_SiteLayout。

在Default.cshtml中引用。在_SiteLayout中,有这样的HTML:
    <header>
        <div class="content-wrapper">
            <div class="float-left">
                <p class="site-title"><a href="~/Images/something.png"></a></p>
            </div>

它最初有一个"随网站而来"的图像,而不是"something.png",但由于我在运行它时没有在浏览器中看到原始图像,我首先将其更改为~/images/orderedList7.png,然后更改为"something.png",试图引发错误消息或警告。但是没有!宽容,你的名字是html!(或者相反?)。

无论如何,为什么我在运行站点时没有看到布局文件中指定的图像?

<header>
        <div class="content-wrapper">
            <div class="float-left">
                <p class="site-title"><img src="~/Images/something.png" /></p>
            </div>

试一下,你正在使用一个锚而不是一个图像标签。

最新更新