Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change whole page background-color in Angular

I am trying to change the background color for the whole page in Angular(would use body, or html tag when working without framework). and I can't find the best practice for this, I want it to be within the framework if possible since I am building an application for years to come.

like image 368
Efim Rozovsky Avatar asked Oct 10 '17 15:10

Efim Rozovsky


People also ask

How do I change the color of my background in HTML?

To add background color in HTML, use the CSS background-color property. Set it to the color name or code you want and place it inside a style attribute. Then add this style attribute to an HTML element, like a table, heading, div, or span tag.

How do I change the background color in JQ?

To set the background color using jQuery, use the jQuery css() property. We will set background color on mouse hover with the jQuery on() method.


1 Answers

If you are using angular-cli.
There should exist a global style file.

  • src
    • app
    • assets
    • environments
    • index.html
    • styles.css

In there you should be able to put your style e.g. html { background-color: black; } to effect the whole page.

like image 72
Andresson Avatar answered Oct 29 '22 05:10

Andresson