使用BMap.Autocomplete实现百度搜索文本框自动填充的功能 在手机版显示默认会很小,是12px;见下图
经谷歌浏览器调试发现动态加载的css,样式里字体大小是12px;需要自己重新写样式,并且 加 !important 拥有最高优先级
.tangram-suggestion table{width:100%;font-size:25px !important;margin-top: 10px !important;}
.tangram-suggestion table tr td {
overflow:scroll !important;
height:42px !important;
padding:0 10px !important;
line-height:42px !important;
}
.tangram-suggestion .route-icon {
overflow:hidden;
padding-left:30px !important;
font-style:normal;
background:url(http://webmap1.map.bdstatic.com/wolfman/static/common/images/ui3/tools/suggestion-icon_013979b.png) no-repeat 0 -20px !important;
background-size:25px 90px !important;
}
改后样式: