2
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’m doing it this way:
<div class="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 sits on a 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 on body
, thus: <body class="background">
works perfectly, but when I try to put it into a div
right on the page gets the blanks, how do I solve this problem?
Can create a fiddle?
– Renan Gomes
@Renan might, but I don’t know if you can use ng-view in fiddle
– DiegoAugusto