android - 安卓機(jī)上 html input 改這個(gè)小水滴顏色的問題
問題描述
安卓機(jī)上 html input輸入文字后,在點(diǎn)擊字的中間的時(shí)候會(huì)出現(xiàn)一個(gè)水滴一樣的東西,請(qǐng)問可以改這個(gè)水滴的顏色嗎
如果是安卓機(jī)自帶的,為什么有些是水滴形狀,有些是房屋的形狀html在微信上顯示:
手機(jī)自帶瀏覽器顯示:
微信上輸入框的顏色是這樣的:
問題解答
回答1:<style name='Widget.TextView'> <item name='android:textAppearance'>?android:attr/textAppearanceSmall</item> <item name='android:textSelectHandleLeft'>?android:attr/textSelectHandleLeft</item> <item name='android:textSelectHandleRight'>?android:attr/textSelectHandleRight</item> <item name='android:textSelectHandle'>?android:attr/textSelectHandle</item> </style>
不好意思,看錯(cuò)了,你可以試著修改theme中的屬性試試,我看系統(tǒng)主題里是有這個(gè)屬性的
<style name='Theme'><!-- Text selection handle attributes --><item name='textSelectHandleLeft'>@android:drawable/text_select_handle_left</item><item name='textSelectHandleRight'>@android:drawable/text_select_handle_right</item><item name='textSelectHandle'>@android:drawable/text_select_handle_middle</item><item name='textSelectHandleWindowStyle'>@android:style/Widget.TextSelectHandle</item> </style> 回答2:
水滴的形狀是android 5.0以后(或者適配了android design的效果),而房屋狀是4.x版本的效果,此項(xiàng)依賴android系統(tǒng)和顯示html應(yīng)用的設(shè)置,比如華為的機(jī)器就是那個(gè)綠色水滴,而且還不能變色= =
相關(guān)文章:
1. html5 - 如何實(shí)現(xiàn)圖中的刻度漸變效果?2. css - 關(guān)于偽類背景問題3. css - 怎么實(shí)現(xiàn)一個(gè)圓點(diǎn)在一個(gè)范圍內(nèi)亂飛4. javascript - 關(guān)于禁用文本選擇與復(fù)制的問題5. html - 移動(dòng)端radio無法選中6. javascript - 有什么工具可以自動(dòng)給css3的樣式 加 前綴 要最簡單的 不會(huì)sass less7. 前端 - html5 audio不能播放8. javascript - history.replaceState()無法改變query參數(shù)9. html5 - vue 里的Elemen UI的時(shí)間怎么轉(zhuǎn)化為時(shí)間戳嗎10. javascript - 圖片請(qǐng)求失敗怎么去掉左上角的小圖標(biāo)?
