我可能有一个很常见的问题,到处搜索,几乎尝试了所有东西,显示:块,缩放:1,设置高度,宽度没有任何效果。我有一个表,它实际上是一个 POP UP,用 javascript 和 jquery 作为墙。这是我的代码的简单示例。
$(tr1).css('width','210px');
$(tr1).css('height','63px');
$(tr1).addClass('testClass');
$(tr1).css('border-bottom','solid 1px #c6c7c5');
$(tr1).mouseover(function(){
$(tr1).css('cursor','pointer');
});
$(tr1).click(function(){
open_report('EXCEL',sparam);
popUpIsOpen = false;
removePopupBtn();
$(wrapperBox).remove();
});
$(tr2).css('width','210px');
$(tr2).css('height','63px');
$(tr2).addClass('testClass');
这是我的CSS
.testClass{
width: 210px;
height: 63px;
zoom: 1;
display: block;
background-repeat: no-repeat;
background: -webkit-gradient(linear, left top, left bottom, from(#dcdedb), to(#c9cbc8));
background: -moz-linear-gradient(top, #dcdedb, #c9cbc8);
background-image: -o-linear-gradient(top, #dcdedb, #c9cbc8);
background: -ms-linear-gradient(top, #dcdedb 0%,#c9cbc8 100%);
background: linear-gradient(top, #dcdedb 0%,#c9cbc8 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#dcdedb', endColorstr='#c9cbc8',GradientType=0);
}
.testClass:hover {
background: -webkit-gradient(linear, left top, left bottom, from(#eaebea), to(#d6d7d5));
background: -moz-linear-gradient(top, #eaebea, #d6d7d5);
background-image: -o-linear-gradient(top, #eaebea, #d6d7d5);
background: -ms-linear-gradient(top, #eaebea 0%,#d6d7d5 100%);
background: linear-gradient(top, #eaebea 0%,#d6d7d5 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eaebea', endColorstr='#d6d7d5',GradientType=0);
}
在除 IE(所有版本)之外的所有浏览器中工作......任何帮助将不胜感激!:)
在过滤器中添加了 GradientType=0,仍然无法正常工作。