Customize Twitter Bootstrap Classnames

£可爱£侵袭症+ 提交于 2020-01-03 17:04:14

问题


http://getbootstrap.com/customize/

Above link, customizes Bootstrap's components, Less variables, and jQuery plugins to get your very own version.

I am wondering if it's possible to customize bootstrap by adding prefixes to it's classes, for example:

".container" = ".myid_container"
".btn-group" = ".myid_btn-group"

回答1:


You can @extend bootstrap classes and call them whatever you want if you are using sass. Here is the info http://www.sitepoint.com/sass-semantically-extend-bootstrap/

But if you use plain bootstrap.css I'm not sure if there is a way to rename bootstrap classes except for renaming them in the file.




回答2:


Just go to your bootstrap css file on any editor and then use "Find & Replace" (Ctrl + H in Notepad++) to replace all '.' with '.myid_'



来源:https://stackoverflow.com/questions/29003264/customize-twitter-bootstrap-classnames

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