我有一個<svg>
,我想包圍<input>
文本框。我已將<svg>
的z-index
設置爲高於包含<div>
和<input>
文本框的z-index
甚至更高,但<svg>
仍位於<input>
文本框的頂部。z-index不適用於<input>
<form id="before-list" onsubmit="return false;">
<label for="search" class="ui-hidden-accessible">Label:</label>
<div class="ui-input-search ui-body-inherit ui-corner-all ui-shadow-inset ui-input-has-clear"><span class="ui-helper-hidden-accessible" aria-live="polite" role="status"></span>
<input style="z-index: 10000;" autocomplete="off" class="ui-autocomplete-input" name="search" id="search" value="" placeholder="placeholder" data-type="search" type="text"><a href="#" class="ui-input-clear ui-btn ui-icon-delete ui-btn-icon-notext ui-corner-all ui-input-clear-hidden" title="Clear text">Clear text</a>
</div>
</form>
<svg style="position: absolute; left: 0px; top: 0px; z-index: 1001;" xmlns="http://www.w3.org/2000/svg" width="396" version="1.1" height="78">
<path d="M37.321735818577594,19.412056931773776C91.00900384635584,19.71827132609725,306.20767155776537,15.079895914223181,359.3368606653108,21.253021635495596C412.4692927191486,27.426524157459045,410.1732367732173,50.26181430495186,356.10649891451214,56.45301593533142C302.039761055807,62.64421756571098,86.9940586922537,64.75550694155167,34.93643351307978,58.40023141777294C-17.12119166609414,52.04495589399421,-10.036532153974994,24.179328007664637,43.760747839468635,18.32136279265903C97.55802783291226,12.463397577653424,305.393552534696,22.43059390522592,357.72011347374155,23.252440127739302" stroke="#000000" fill="none" style=""></path>
</svg>
我怎樣才能獲得的文本框中輸入要對SVG的頂部?
(使用Firefox 24 & jQuery Mobile的1.4.0)
請提供足夠的代碼來重現問題*在問題本身*。你不應該依賴外部鏈接,因爲如果這個問題被打破,這個問題將變得毫無用處。 – Quentin