大家好,我有一个使用 JS 的 UL 菜单,在 IE 中,DIV 的标题“过滤器”是垂直的,看起来很正确,但在 Chrome 中它是水平的
感谢您的帮助
IE浏览器
铬浏览器
HTML:
<div id="filterDiv">
<ul class="sideMenu" style="top: 280px;">
<li style="border-bottom: none;">
<div id="filterItem" class="sideMenuDiv" ><img src="../images/plus.gif" /> Filters</div>
</li>
</ul>
</div>
CSS:
ul.sideMenu {
position: fixed;
top: 150px;
left: 0px;
margin: 0px;
padding: 0px;
list-style: none;
}
ul.sideMenu > li {
height: 80px;
width: 25px;
background-color:#000066;
cursor:pointer;
border-bottom: 1px white solid;
}
div.sideMenuDiv {
padding-left: 5px;
padding-right: 5px;
padding-top: 3px;
padding-bottom: 3px;
background-color:#000066;
color: #FFFFFF;
font-weight: bold;
writing-mode: tb-rl;
filter: flipv fliph;
font-size: 10pt;
font-family: arial, sans-serif;
height: 100%;
}
JS:
$(document).ready(function()
{
$("#filterItem").click(function() {
$("#filterPanel").fadeToggle("slow", function() {
toggleImg( 'filter' );
});
$(this).toggleClass("active");
toggleImg( "filter" );
return false;
});
$("#filterPanel").draggable({ snap: "#filterItem" });
});
function closeDraggablePanel( panelName, topPos)
{
$("#"+panelName+"Panel").toggle("slow", function() {
toggleImg( 'filter' );
// Reposition to default
$("#"+panelName+"Panel").css( "top", topPos);
$("#"+panelName+"Panel").css( "left", "25");
});
}
function toggleImg( name )
{
if( $("#" + name +"Panel" ).is(':visible') )
{
$("#" + name + "Item" + " > img").attr("src", "../images/minus.gif");
}
else
{
$("#" + name + "Item" + " > img").attr("src", "../images/plus.gif");
}
}
// Toggle the display of the element with the given ID.
function toggle(id)
{
$('#' + id).slideToggle("slow");
}