angular2 - 如何在特定组件中设置背景图像

时间:2017-03-31 12:50:54

标签: html css angular

我正在尝试为特定组件设置背景图像。我想将图像设置为example.component.html的整个html页面,但它不适用于我

example.component.css

html {background: url(assets/imagenew.jpg) no-repeat center center fixed;    -
                   webkit-background-size: cover;  
                  -moz-background-size: cover; 
                  -o-background-size: cover;   background-size: cover; } 
 body { background-color: transparent;    
        overflow: hidden; }

0 个答案:

没有答案