I have a small system in Angular where I have a login screen: But when I try to put a background image the result is not as expected:
I'mdoingthefollowing:
<divclass="background">
../Código da página
</div>
CSS:
.background{
background: url(nature.jpg) no-repeat center center fixed;
background-size: cover; /*Css padrão*/
-webkit-background-size: cover; /*Css safari e chrome*/
-moz-background-size: cover; /*Css firefox*/
-ms-background-size: cover; /*Css IE não use mer#^@%#*/
-o-background-size: cover; /*Css Opera*/
}
This login page is rendered via ng-view
which is in div
in my index.html
:
index.html:
<body>
<div ng-view></div>
</body>
If I put my class CSS
which is responsible for the background image in body
, this way: <body class="background">
works perfectly, but when I try to put it in a div
direct on the page it gets the How do I resolve this problem?