简体   繁体   中英

Override MVC5 bootstrap

Doing my first MVC 5 app and I want to use the included bootstrap UI stuff, but I have some tweeks I want to do, like background colors, floating the nav bar to the right, etc.

If I remember correctly, the CSS that gets rendered is the one read last, so for example in this list, css3 styles will be the ones rendered (assuming the contents are identical):

css1
css2
css3

So, if I want to override certain parts of the bootstrap.css file, should I just make an override.css and put it last in the bundle? Or is there a better way to do it?

Also, when I am done developing and I switch to the min versions of the css and js libraries, will my overrides still work?

put your css file after the bootstrap css. You already found the answer yourself.

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