当前位置:主页 > 查看内容

css设置body背景图片满屏的实例代码

发布时间:2021-07-24 00:00| 位朋友查看

简介:废话不多说了,直接给大家贴代码了,具体代码如下所示: @{ Layout = null; ViewBag.Title = Login Page;}!DOCTYPE htmlhtmlhead meta name=viewport content=width=device-width / titleIndexMain/title @*样式*@ style body { height: 100%;width: 100%; b……

废话不多说了,直接给大家贴代码了,具体代码如下所示:

@{
    Layout = null;
    ViewBag.Title = "Login Page";
}
<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>IndexMain</title>
    @*样式*@
    <style>
        body {
            height: 100%;width: 100%;
            background: url('../../Images/LoginIMG/LoginBackground.jpg');
            background-size:cover;
        }
    </style>
</head>
<body>
    <div> 
    </div>
</body>
</html>

总结

以上所述是小编给大家介绍的css设置body背景图片满屏的实例代码,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持!


原文链接:https://m.jb51.net/css/601260.html
本站部分内容转载于网络,版权归原作者所有,转载之目的在于传播更多优秀技术内容,如有侵权请联系QQ/微信:153890879删除,谢谢!

推荐图文


随机推荐