1
我有一個巨大的問題,我無法解決的IE7。一個問題是溢出:隱藏,一直在閱讀一些關於它的內容,但是卻無法使其發揮作用。jQuery動畫IE7
有沒有人有一個提示如何解決呢?
CSS:
#items {
display: inline;
position:relative;
margin: 0;
padding: 0;
}
#items li {
float: left;
list-style-type: none;
margin: 0;
padding: 5px 0 0 0;
}
#items .itemplaceholder {
height:200px;
width:160px;
text-align: center;
position: relative;
}
.placeholder {
width:640px;
height:200px;
overflow: hidden;
}
.content {
width:800px;
height:240px;
}
#items .itemplaceholder p {
position: absolute;
bottom: 5px;
width: 100%;
height: 50%;
}
#items .itemplaceholder p a {
position: absolute;
display: block;
bottom: 0;
text-align: center;
width: 100%;
}
HTML:
<div class="placeholder">
<div class="content">
<ul id="items">
<li>
<div class="itemplaceholder">
<img src="http://www.els.qut.edu.au/blendedlearning/blackboard/graphics/test_on.gif"/>
<p>
Test title<br/>
Description A
<a href="#">Link</a>
</p>
</div>
</li>
<li>
<div class="itemplaceholder">
<span>
<img src="http://www.aja.com/images/software/AJA_TestIconNEW.png"/>
<p>
Little bit longer title for test<br/>
Another description that is longer
<a href="#">Link</a>
</p>
</span>
</div>
</li>
<li>
<div class="itemplaceholder">
<img src="http://ce.byu.edu/cw/testprep/images/testDrive.jpg"/>
<p>
Title 3<br/>
Lorem ipsum
<a href="#">Link</a>
</p>
</div>
</li>
<li>
<div class="itemplaceholder">
<img src="http://www.els.qut.edu.au/blendedlearning/blackboard/graphics/test_on.gif"/>
<p>
Title<br/>
Text
<a href="#">Link</a>
</p>
</div>
</li>
<li>
<div class="itemplaceholder">
<img src="http://ce.byu.edu/cw/testprep/images/testDrive.jpg"/>
<p>
Title title title<br/>
Lorem ipsum
<a href="#">Link</a>
</p>
</div>
</li>
<li>
<div class="itemplaceholder">
Item F
</div>
</li>
</ul>
</div>
</div>
<a href="#" id="prev">Prev</a>
<a href="#" id="next">Next</a>
JQ:
function next() {
$menu = $('#items');
$first = $menu.find("li").first();
unbindClick();
$first.animate({
marginLeft: -1 * $first.width()
}, {
duration: 600,
queue: false,
complete: function() {
$menu.append($first);
$first.css('marginLeft', '');
bindClick();
}
});
}
function prev() {
$menu = $('#items');
$first = $menu.find("li").first();
$last = $menu.find("li").last();
$menu.prepend($last);
var width = $last.width();
$last.css('marginLeft', -1 * width + "px");
$menu.prepend($last);
unbindClick();
$last.animate({
marginLeft: 0
}, {
duration: 600,
queue: false,
complete: bindClick
});
}
function unbindClick() {
$("#next").unbind('click');
$("#prev").unbind('click');
}
function bindClick() {
$("#next").click(next);
$("#prev").click(prev);
}
$("#next").click(next);
$("#prev").click(prev);
nope,那沒有工作:/ – johan 2012-03-04 20:22:07
沒有工作什麼?我看到另一個問題,由於執行一個附錄,但在與IE7混淆的動畫完成。現在請更具體一些:你的意思是什麼?你想擺脫哪個問題? – 2012-03-04 20:23:58
隱藏的溢出不適用。和jquery動畫行爲真的很奇怪...我的電腦上的隱藏溢出的 – johan 2012-03-04 20:31:31