消除两个样式表中的冲突 [英] removing conflicts in two stylesheets

查看:97
本文介绍了消除两个样式表中的冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有模板的CSS,当我在那个tempalte上安装bootstrap时,两者的CSS彼此冲突。

有没有工具这将删除两个CSS样式表的冲突样式

Hi ,
I have CSS of template i get and when i installed bootstrap on that tempalte the css of both are conflicting with each other.
Is there any tool that will remove the conflicting styles of both CSS stylesheets

推荐答案

有许多方法可以遵循以避免这种情况。



1.您可以将项目名称用作css类/ id名称的命名空间。



eg .yourprojectname-class-name



2.您可以使用!important 来覆盖现有的css类



点击此处查看更多信息: !重要的是



请阅读此内容以获取更多方法: bootstraps css和自己的css之间的冲突
There are number of ways where you can follow to avoid this.

1. You can use your project name as a namespace for your css class/id names.

e.g. .yourprojectname-class-name

2. You can use !important to override the exiting css classes

Check here for more : !important

Please read this for more methods : conflict between bootstraps css and own css


这篇关于消除两个样式表中的冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆