1
我想要一個div的內容從頂部向下滑動。我嘗試過的所有方法似乎都「揭示」了幾乎是靜態的內容。我想從屏幕邊緣向下滑動並推送內容。我將如何做到這一點? Jsfiddle hereDiv從頂部幻燈片不滑動到顯示
HTML
<div id="dolphin">
<div id="lizard"><img src="http://www.beardeddragon.co/image/cache/data/blackhat-500x500.jpg"></div>
</div>
<div id="content"></div>
CSS
#lizard {
padding:50px;
display:none;
}
#dolphin {
position: fixed;
width: 100%;
background-color: green;
}
#content {
height: 2000px;
}
JS
$(document).ready(function(){
$("#dolphin").click(function(){
$("#lizard").stop().slideToggle("fast");
});
});
「......但在同一時間,我需要'#flip'是'fixed'」?那是對的嗎?嘗試使用正確的名稱... *翻轉* somethign實際上不翻轉是有趣的:) –
嗨,是的,我想要div保持固定 – ScreamQueen