Css 在IE8上将宽度设置为
是否可以将宽度设置为选项?我尝试了很多方法,但到目前为止,什么都没有: 只有在IE上我才有这个问题。已经尝试过这个: jQuery:Css 在IE8上将宽度设置为,css,internet-explorer-8,Css,Internet Explorer 8,是否可以将宽度设置为选项?我尝试了很多方法,但到目前为止,什么都没有: 只有在IE上我才有这个问题。已经尝试过这个: jQuery: $( "select" ).toggle( function() { $( "option" ).animate({ width: 500 }, 1000 ); }, function() { $( "option" ).animate({ width: 240 }, 1000 ); } ); -其他jQuery- $("select") .mouseover(
$( "select" ).toggle(
function() {
$( "option" ).animate({
width: 500
}, 1000 );
},
function() {
$( "option" ).animate({
width: 240
}, 1000 );
}
);
-其他jQuery-
$("select")
.mouseover(function(){
$(this)
.data("origWidth", $(this).css("width"))
.css("width", "auto");
})
.mouseout(function(){
$(this).css("width", $(this).data("origWidth"));
});
-css-
option{
width:auto;
}
-除IE外,所有浏览器都能完美运行-
如果有人能帮我解决这个问题,我将非常感激
检查小提琴示例:尝试选项{display:block;}。如果需要对齐选项{float:left;}