html5 datalist wont dropdown when the sugguest list is large

萝らか妹 提交于 2019-12-06 15:52:50

I believe this is caused by a known Cromium bug:

Enclosed your datalist to a div and put overflow:

<div style="overflow-x: hidden; overflow: scroll; width: 100%; height:500px"> 
       <datalist id="citysuggest">
    <option value="北京">
    <option value="锦州">
    <option value="唐山">
    <option value="天津">
    <option value="清远">
    <option value="盘锦">
    <option value="成都">
</datalist>
<input type="text" list="citysuggest"  name="name1" value="" />
</div>

Hope this helps!

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