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

Html angular2-如何在特定组件中设置背景图像,html,css,angular,Html,Css,Angular,我正在尝试为特定组件设置背景图像。我想将图像设置为example.component.html的整个html页面,但它对我不起作用 示例.component.css html {background: url(assets/imagenew.jpg) no-repeat center center fixed; - webkit-background-size: cover; -moz-background-si

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

示例.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; }

像这样的
它只将样式设置为div@wildDev…它不起作用