How to make Datalist arrow to be always visible

99封情书 提交于 2019-11-30 14:44:59

问题


I am trying to have datalist list element always visible. As standard after focused lost, the arrow disappears.

I would like to have it always like this: Here is the plunker: https://plnkr.co/edit/?p=preview

<input list="browsers" name="myBrowser" />
<datalist id="browsers">
  <option value="Chrome">
  <option value="Firefox">
  <option value="Internet Explorer">
  <option value="Opera">
  <option value="Safari">
</datalist>

ENVIRONMENT: Angular directive

Any ideas how to achieve it?

Best,


回答1:


I have got the arrow always visible using css:

input::-webkit-calendar-picker-indicator {
              opacity: 100;
           }
    <input list="browsers" name="myBrowser" />
    <datalist id="browsers">
      <option value="Chrome">
      <option value="Firefox">
      <option value="Internet Explorer">
      <option value="Opera">
      <option value="Safari">
    </datalist>


来源:https://stackoverflow.com/questions/35196782/how-to-make-datalist-arrow-to-be-always-visible

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!