简体   繁体   中英

How to remove Boostrap default body style in a component.html

I have a angular widget directive with my own css. when i add my widget in a another application component it's overriding with Bootstrap default css/styles.

Here is my boostrap css 在此处输入图片说明

My question is How i can remove font-family in my compoent .css I am trying to override, but its not working?

    body {

line-height: 1.15; 
}

在此处输入图片说明

I also tried with !important as follows, but still applying bootstrap styles

body {
  font-family: "Open Sans", sans-serif !important;
}

Insert your CSS after the bootstrap CSS. If that doesn't work user !important to overwrite the styles you want.

example:

body {
   font-family:none!important;
   line-height: 1.15!important;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM