如何在光標懸停時將光標變爲輸入文件或輸入文本上的指針?CSS:如何使光標成爲輸入文件上的指針?
我的嘗試,但它並沒有當然的工作,
<input type="file" style="cursor: pointer;"/>
還是我必須使用的javascrip(jQuery的)?
編輯:
對不起我的錯誤 - 光標不會更改爲一個點上
<input type="text" style="cursor: pointer;"/>
但不是
<input type="file" style="cursor: pointer;"/>
您可以測試Firefox上this link然後就看到我的意思是。
只有button
的file
更改爲指針,但不更改爲file
的input field
。
編輯2:
Here是我的CSS '黑客',
<div id="right-col" style="position:relative; width:76px; height:24px; overflow:hidden; border:1px solid #000;">
<input type="file" style="position:absolute; top:0; right:0; z-index:2;opacity:1; cursor:pointer;"/>
</div>
它不會成爲'輸入類型= 「文件」'當鼠標移動到按鈕,併爲'INPUT TYPE =「文本指針「當你將鼠標移到文本字段上時。 – BoltClock
是的,它是在按鈕上,但不是當你把鼠標放在'file'的'input field'上時。 – laukok
不要相信這是可能的。但是*爲什麼在地球上*你想要這麼做?文本光標的目的是爲了表明您可以在那裏輸入文本... – animuson