未來我有這樣的代碼:切換動畫從按鈕
$(function(){
$("#modal-launcher, #modal-background, #modal-close").click(function() {
$("#modal-content,#modal-background").toggle("slow");
return false;
});
});
和這個網站:
<button id='modal-launcher'>
Launch Modal Window
</button>
<div id='modal-background'></div>
<div id='modal-content'>
<button id='modal-close'>Close Modal Window</button>
</div>
這裏有一個JSFiddle。
現在,當您單擊按鈕時,模式顯示在中心。相反,我想要一個動畫,其中的模態似乎來自按鈕「Launch Modal Window」按鈕,然後轉到中心。這可能嗎?我在網上尋找一個例子,但我現在找不到,但我會繼續尋找。
這可能嗎?感謝所有幫助!