我做了一个网站,但IE7出了点问题我有一个导航,当我单击一个li元素时,所有li的Slideup和匹配的div slidesdown。
这在除IE7之外的所有浏览器中都适用
有人知道我需要做什么来解决此问题吗?导致最小宽度:0不起作用,我必须使用位置:相对
幻灯片有效,但幻灯片无效。
这就是我所拥有的...
var $j = jQuery.noConflict();
$j(function() {
$j('ul#menus li a').click(
function() {
$j('#menu-container .post').slideUp();
$j('#menu-container #post-' + $j(this).attr('class')).slideDown();
});
});
/* Menu */
#menu-container {
display: table;
margin: 0px auto;
padding-top: 50px;
width: 500px;
text-align: center;
}
#menu-container .post {
display: none;
margin: 25px auto 50px;
width: 575px;
min-width: 0;
}
#menu-container .first_item {
display: block;
}
#menu-container h2 {
margin-bottom: 20px;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<ul id="menus">
<li class="post-1 post type-post hentry category-menus" id="post-1">
<h2><a href="#" rel="bookmark" title="Permanent Link to menu01" class="1">menu01</a></h2>
</li>
<li class="post-11 post type-post hentry category-menus" id="post-11">
<h2><a href="#" rel="bookmark" title="Permanent Link to menu02" class="11">menu02</a></h2>
</li>
<li class="post-59 post type-post hentry category-menus" id="post-59">
<h2><a href="#" rel="bookmark" title="Permanent Link to menu03" class="59">menu03</a></h2>
</li>
</ul>
<div id="menu-container">
<div class="post-1 post type-post hentry category-menus first_item" id="post-1">
Content
</div>
<div class="post-11 post type-post hentry category-menus" id="post-11">
Content
</div>
<div class="post-59 post type-post hentry category-menus" id="post-59">
Content
</div>
</div>
<!-- end #menu-container-->
类不能为数字。尝试将您的班级改为单词,然后看看是否可行。
class="title_11"