How can I override bootstrap classes? [duplicate]

烈酒焚心 提交于 2020-01-16 18:27:52

问题


I wanted to override bootstrap default styles on a particular element ,but instead of using important property ,is there any way to do that , sometimes the !important property don't work , i was creating bootstrap form but when i tried to give width to any form control then it didn't apply why ?


回答1:


I think you should work with the CSS priorities.

There is a similar topic where you can find helpful info about it Here: best way to override bootstrap css

Additionally, in the following link there is a sample about specificity were you should try in your code to target the elements you need to change Here: CSS class priorities

If possible share some samples of your code where you have issues.



来源:https://stackoverflow.com/questions/47243076/how-can-i-override-bootstrap-classes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!