更改asp.net中的默认登录页面UI

时间:2019-01-04 06:48:34

标签: login asp.net-mvc-5 themes

我正在asp.net mvc5项目上,我想更改登录页面的默认主题,任何想法该怎么做。 this is the deafult ui which i want to change with some eye catching theme.

1 个答案:

答案 0 :(得分:1)

您具有登录页面视图或部分视图。尝试在MVC项目的“查看”文件夹中找到它。因此,可能您将bundle用于链接css和js文件。您可以在App_Start\BundleConfig.cs文件中找到捆绑软件的配置。在文件Application_Start中,注册以下CSS文件:

ublic class MvcApplication : System.Web.HttpApplication
{
   protected void Application_Start()
   {
        BundleConfig.RegisterBundles(BundleTable.Bundles);
   } 
}

因此,您应该了解登录页面中样式所使用的CSS文件,并根据需要更改此文件。

我注意到您使用引导程序样式。如果您不喜欢该主题,则可以禁用引导程序样式,只需使用bootstrap.css删除捆绑软件即可。像这样:

bundles.Add(new StyleBundle("~/Content/css").Include(
            "~/Content/bootstrap.css",
            "~/Content/bootstrap-theme.css",
            "~/Content/bootstrap.min.css",
            "~/Content/site.css"));

更改为此:

bundles.Add(new StyleBundle("~/Content/css").Include(
            "~/Content/site.css"));