如何告诉浏览器首先识别我的样式表,然后识别我使用的框架?
我使用蓝图,浏览器首先识别它们,如果它们有东西,就不是我的。
我该如何做一些事情,然后浏览器首先识别我的样式表,然后他们尝试在页面中使用它们。
我知道我可以使用 !important 但我把 !important 放在每个标签上并不好。他们是否有任何技巧可以首先应用我的样式表,甚至蓝图也有一些给他们。
I use blueprint and browser recognize them first and not mine if they have something.
how i can do something then browser recognize the style-sheet of mine first then they try to use them in page.
i know i can use !important but it's not good that i put !important on every tag. are their any hack to apply my stylesheet first even blueprint have some for them.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
听起来您可能以与您想要的相反的顺序使用样式表。如果您希望您的样式而不是您正在使用的框架中的样式生效,请将您的样式表列在其他样式表之后。理想情况下,您的样式表将列在最后。这就是样式表规则级联的效果。
It sounds like you may be using stylesheets in the opposite order of what you want. If you want your styles to be in effect instead of the styles from the frameworks you are using, list your stylesheets after the other stylesheets. Ideally, your stylesheets will be listed last. That's the effect of cascading for stylesheet rules.
样式表按照出现的顺序应用,只需在框架的 CSS 之后插入 CSS 即可。
Stylesheets are applied in order of appearance, just insert your css after those of the framework.
浏览器具有确定应用哪种样式的特异性规则。如果您有多个外部样式表,确保应用所需样式的最简单方法是在蓝图样式表之后加载样式表。样式表中定义的任何样式规则都将覆盖蓝图样式。
Browsers have specificity rules that determine which style is applied. If you have multiple external stylesheets, the easiest way to ensure that your desired styles are applied is to load your stylesheet after the Blueprint stylesheet. Any style rules defined in your stylesheet will override the Blueprint styles.