Twitter bootstrap 使用bootstrap.css作为内容脚本会扭曲gmail用户界面吗?

Twitter bootstrap 使用bootstrap.css作为内容脚本会扭曲gmail用户界面吗?,twitter-bootstrap,google-chrome-extension,Twitter Bootstrap,Google Chrome Extension,我正在gmail中注入一个bootstrapmodal。为此,我需要bootstrap.css。我在manifest.json "content_scripts": [ { "matches": ["https://mail.google.com/*"], "css":["lib/bootstrap/dist/css/bootstrap.css", "css/modal.css" ], "js": [

我正在gmail中注入一个
bootstrap
modal。为此,我需要
bootstrap.css
。我在
manifest.json

"content_scripts": [
    {
      "matches": ["https://mail.google.com/*"],
      "css":["lib/bootstrap/dist/css/bootstrap.css",
             "css/modal.css"
             ],
      "js": [ "lib/jquery/jquery.min.js",
              "lib/bootstrap/dist/js/bootstrap.min.js"
             ],
    "run_at":"document_end"
    }
但它会减小字体大小并扭曲菜单栏

当我删除css文件时,一切看起来都很好

还有一个问题
bootstrap
使用字形图标,但它们没有显示,因为extension在下面查找这些字体:

https://mail.google.com/mail/u/fonts/glyphicons-halflings-regular.ttf

https://mail.google.com/mail/u/fonts/glyphicons-halflings-regular.woff

我也将这些文件添加为
web\u可访问的\u资源
。但它们仍然不起作用。尝试将其注入iframe 2中。或者修改CSS以限制元素的特殊性,方法是在规则中的所有选择器前面加上模态id 3。字体URL应指向扩展名pathFirst选项听起来不可行。对于字体,我是否必须在引用图标的位置使用chrome.extension.getURL()。字体现在可以使用了。对于扭曲的ui,我考虑使用作用域样式。这行吗?@src属性的vinchi值是指向html的路径(而不是驱动器路径),即chrome.extension.getURL(“扩展根目录内的html路径”);有关更多信息: