简体   繁体   English

CSS3:当页面包含部分vb.net回发时,IE7 / 8中不是选择器

[英]CSS3 :not selector in IE7/8 when page includes partial vb.net postback

I have the following CSS which is working fine in all browsers except any less that IE9. 我有以下CSS,在所有浏览器中都可以正常工作,但IE9除外。

table:not([class]) {
    width:100%;
    background-color:#CCC;
    margin: 2px 0 0 0;
}

I have a selectivizr javascript pack which does a pretty good job of fixing this, until a partial postback is made to the page... then it all gets totally ignored because it is not in the pageLoad function. 我有一个selectivizr javascript包,它在解决此问题方面做得很好,直到对页面进行了部分回发...然后所有内容都被完全忽略了,因为它不在pageLoad函数中。

Can anyone think of another way around this? 谁能想到另一种解决方法?

I have used the :not selector to avoid all other tables inheriting these styles. 我已经使用:not选择器来避免所有其他表继承这些样式。

You cannot achieve this with selectivizr though I think it is something they plan on doing. 尽管我认为这是他们计划做的事情,但您无法使用selectivizr实现这一目标。 I read somewhere of someone including the script again each time dynamic content was added but this is not recommended practice. 每次添加动态内容时,我都会再次读取某人的内容,包括脚本,但是不建议您这样做。 Are you already using jQuery? 您已经在使用jQuery吗? In that case you are better off using jQuery. 在这种情况下,最好使用jQuery。 If you are concerned about the size of jquery maybe try zepto or directly use jquery's sizzle engine. 如果您担心jquery的大小,则可以尝试zepto或直接使用jquery的sizzle引擎。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM