CSS Background-Image refuses to display in ASP.Net MVC

前端 未结 10 910
别那么骄傲
别那么骄傲 2020-12-10 01:14

I am having trouble displaying an background image in my ASP.NET MVC 2 application. Currently, In ~/Views/Shared/Site.master, I set my link to the style sheet to:

         


        
10条回答
  •  死守一世寂寞
    2020-12-10 02:02

    I would recommend to just drag and drop the image. Visual Studio will generate the code automatically for you,

    body { background-image: url('../../Content/Images/dark123.jpg'); }

    This URL code is auto-generated by Visual Studio you don't need to write the code manually.

    Hope this will fix your issue.

    Cheers!

提交回复
热议问题