我需要更改我的MVC网站的徽标。怎么做? [英] I need to change the logo of my MVC website. How to do that?

查看:91
本文介绍了我需要更改我的MVC网站的徽标。怎么做?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我是ASP.NET的初学者。我创建了一个MVC网站,我需要更改我网站的徽标。该怎么做?



First of all I am a beginner in ASP.NET. I have created a MVC Website and I need to change the logo fo my website. How to do that?

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>@ViewBag.Title - My ASP.NET MVC Application</title>
        <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
        <meta name="viewport" content="width=device-width" />
        @Styles.Render("~/Content/css")
        @Scripts.Render("~/bundles/modernizr")
    </head>
    <body>
        <header>
            <div class="content-wrapper">
                <div class="float-left">
                    <p class="site-title">@Html.ActionLink("your logo", "Index", "Home")</p>
                </div>
                <div class="float-right">
                    <section id="login">
                        @Html.Partial("_LoginPartial")
                    </section>
                    <nav>
                        <ul id="menu">
                            <li>@Html.ActionLink("Home", "Index", "Home")</li>
                            <li>@Html.ActionLink("About", "About", "Home")</li>
                            <li>@Html.ActionLink("Contact", "Contact", "Home")</li>
                        </ul>
                    </nav>
                </div>
            </div>
        </header>
        <div id="body">
            @RenderSection("featured", required: false)
            <section class="content-wrapper main-content clear-fix">
                @RenderBody()
            </section>
        </div>
        <footer>
            <div class="content-wrapper">
                <div class="float-left">
                    <p>© @DateTime.Now.Year - My ASP.NET MVC Application</p>
                </div>
            </div>
        </footer>

        @Scripts.Render("~/bundles/jquery")
        @RenderSection("scripts", required: false)
    </body>
</html>

推荐答案

在某处添加一个html img标签并引用图像的文件路径。



< img src =img / mypath / picture.png/>



src属性应该反映存储图像的路径。
Add an html img tag some where and reference the file path of the image.

"<img src="img/mypath/picture.png" />"

The src attribute should reflect the path where your image is stored.


添加Favicon [ ^ ]



如果您想添加品牌favicon到您的网站,你可以跟进上面的链接

else为图像添加到布局的标题。



谢谢
Add a Favicon[^]

If you wish to add a brand favicon to your website, you can follow up with the above link
else for a image add to the header in layout.

Thanks


这篇关于我需要更改我的MVC网站的徽标。怎么做?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆