Hi everyone,
I'm actually learning Angular2 and i'm stuck with a ...css issue o_O I was searching for a similar issue without any success, here we go:
I have a single main tag element within the body
I set up background-image within the main div and used background-size: cover to fit but it doesn't seems to work at all, the picture doesn't fit to the div..
I'm very confused because it's the first time that it happened to me
For your information: I used styleUrls to inject css rules within the component
Code
body {
width: 100vw;
height: 100vh;
overflow-x: hidden;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
main {
color: #fff;
position: relative;
width: 90%;
height: 90%;
padding: 30px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
background-size: cover;
background: url(../assets/fond.jpg) no-repeat;
box-shadow: 30px 3px 36px -15px grey, -30px 3px 36px -15px grey;
}
Thanks!
-webkit-background-size: coverI only have to do this w/ Angular o_O - R. Di Rago