我有以下行
<select style="appearance:none;background-image:url('');" disabled>...</select>
擦除選擇框的右“向下箭頭”,使其看起來像一個禁用的文本框,但具有通過 javascript 操作的選擇選項功能。
這來自這篇文章中的一個答案:How to remove the default arrow icon from a dropdown list (select element)? 這是唯一對我有用的答案(我需要它是行內的并且不需要額外的庫)。
但是在 PHPStorm 中,它顯示了一個錯誤cannot resolve file ''
,這讓我認為這不是通過url()
.
我試過這個
appearance:none;background-image:url('data:')
這確實消除了 PHPSTorm 錯誤并且有效,但它也“看起來不正確”。我想知道正確的方法來做到這一點。
uj5u.com熱心網友回復:
你試過以下嗎?
<select style="appearance:none;background-image: none;" disabled>...</select>
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/537410.html
下一篇:python中的字數統計