如何在视图中的日志中放置背景图像? [英] How do I put a background image on a log in view?

查看:87
本文介绍了如何在视图中的日志中放置背景图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是这个mvc5环境的新手,如果我错过了任何信息,请提供帮助。



我尝试过以下操作,但仍然无法显示图片。



I'm new to this mvc5 environment, please help if i've missed any info.

I have tried doing the following but still doesn't display the image.

body
 {
    background-image: url('../../MyTemplate/img/bac.jpg');
    background-repeat: no-repeat;
    background-attachment: fixed;
}





然后我在登录视图中引用了我的样式表。



< link href =〜/ Content / scss / LoginPages.css =stylesheet/>



感谢高级。



Then I referenced my stylesheet on the login view like this.

<link href="~/Content/scss/LoginPages.css" rel="stylesheet" />

Thanks in Advanced.

推荐答案

您好。



我建议您不要使用样式表并参考它喜欢这个











确保你把所有东西放在body标签里,从div标签开始。



希望这对你有所帮助。
Hi.

Instead of doing a style-sheet and referencing it I suggest you do it like this





Make sure you put everything inside the body tag , starting from the div tag.

Hope this helps you.


这篇关于如何在视图中的日志中放置背景图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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