0
我正在設計一個手機網站。它包含彈出。當我注重輸入框時,有時會跳出屏幕(從頂部) ,有時會停留在中間。我首次設計移動網站。我不知道 如何處理它。這裏是我用來打開彈出窗口的代碼。彈出移動屏幕時,我專注於輸入框內彈出
JS:
$("#voucher").fancybox({
'titlePosition':'inside',
'transitionIn':'none',
'transitionOut':'none'
});
HTML:
<div class="voch_txt specific_sprite">Got a voucher, <a id="voucher" href="#inline2">apply it here</a></div>
<div class="hide">
<form action="" method="get">
<div id="inline2">
<h3 class="vocuher_icon">Apply Voucher</h3>
<div class="lightbox_col">
<input name="" class="vocuher_input" value="" type="text"
placeholder="Enter 16 digit voucher code here" >
<input value="update my cart total"
type="button">
</div>
</div>
</form>
</div>
對於視我用頭:
<meta name="viewport" content="width=device-width initial-scale=1.0"/>
你爲什麼使用fancybox? JQM不幫忙? – dejavu
我是新來的。我有jQuery的網站經驗。所以我實現了它在移動。如果您爲jqm提供一些參考指南,將會有所幫助。 – vishu
嘗試使用jQuery的移動彈出。 http://jquerymobile.com/demos/1.3.0-rc.1/docs/demos/widgets/popup/ – dejavu