欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

css里面如何设置body背景图片满屏

程序员文章站 2022-04-14 12:54:24
@{ Layout = null; ViewBag.Title = "Login Page"; } IndexMain @*样式*@ ......
@{
    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>