覆盖引导程序样式不起作用 [英] Override bootstrap style not working

查看:167
本文介绍了覆盖引导程序样式不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的情况,我的样式没有定义的 display 属性值,我最近在我的项目中添加了引导程序,没有任何大问题,只是一个问题.

I have this simple situation, I have an style with no defined display property value, I recently added bootstrap to my project with no major problems, just one.

label 标签中,引导程序样式被定义为 display:inline-block; ,这是我不需要的,并且在我的页面上造成了一些故障.因此,我简单地覆盖了它,但是似乎它正在获得bootstrap值. !important 也不起作用.如您在下图中看到的:

In label bootstrap style is defined a display: inline-block; what I don't need and is causing some troubleshooting on my page. So simply I overwrite it, but it seems It's getting the bootstrap value. !important is not working also. As you can see in the image below:

即使在开发人员工具上,它也被标记为已覆盖.我还测试了从引导文件中删除该行,它可以工作,但是在我的情况下,这不是可行的选择. 就像我说的,我被困在这里,引导程序不再有问题,而且以前也没有这种情况.

Even, It's marked as overwritten on Developer Tools. I also tested removing the line from the bootstrap file and it works, but that's not viable option in my situation. I'm stuck here, as I said, no more problems with bootstrap, and haven't had this situation before.

我必须补充一点,就是我在页面上为样式表设置了正确的位置.

I have to add that I'm setting right position for style sheets on my page.

当我删除引导样式时,我将附加结果和预期结果.即使被覆盖,它似乎也可以正常工作.

I'll attach the result and the expected result, when I remove the bootstrap style. It seems to be working even It is overwritten.

删除引导样式后的预期结果(这适用于及时的Developer工具以及从bootstrap.css中删除).

Expected result when bootstrap style is removed (this apply to in time Developer tools and when removing from bootstrap.css)

PS:IE作为所需的浏览器.

PS: IE as needed browser.

问题已解决,它与IE版本有关,我们公司仅在此应用程序上支持IE,问题是以前的某些更改迫使IE在版本5上运行兼容性,出于任何人都知道的原因,切换到IE作为标准,并且可以正常工作.

Problem solved, It was related to IE version, our company gives support to IE only on this application, and the problem was that some previous change was forcing IE to run compatibility on version 5, for reason that anyone knows, switched to IE as standards and it's working.

谢谢大家的任何想法或评论.

Thank you all any idea or comment.

推荐答案

问题与IE兼容模式有关.

Problem was related as IE compatibility mode.

这篇关于覆盖引导程序样式不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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