【发布时间】:2011-09-10 07:18:43
【问题描述】:
所以我试图产生一种效果,即当您单击图像时,另外两个图像(存储在#sharebar 中)将从左侧滑出。目前的问题是当图像滑出时,它们从按钮下方的左侧滑动,然后在动画完成后向上移动。我希望所有内容始终处于同一水平,以便图像看起来从后面滑出。
谁能帮帮我?这是我所拥有的:
<script>
$(function() {
// run the currently selected effect
function slideOut() {
var options = {};
$("#sharebar").toggle("slide", options, 500, callback() );
};
function callback() {
};
// set effect from select menu value
$( "#download_link" ).click(function() {
slideOut();
return false;
});
$("#sharebar").hide();
});
</script>
</head>
<body>
<div style="margin:200px;min-height:10px;background:#e9e9e9;overflow:hidden;">
<img id="download_link" src="Download.png" style="z-index:2;"/>
<span id="sharebar" style="width:20px;z-index:1;">
<img id="exercise_link" src="exercises.png" />
<img id="subtitles_link" src="subtitles.png" />
</span>
提前致谢! :)
编辑:我认为这可能与 z-index 有关,但我不太确定
【问题讨论】:
-
能否也提供示例html?
标签: javascript jquery css jquery-ui slide