I have a google map autocomplete search script with the API key and it works fine, however, the drop-down suggestions font is very small, the user can't see them.
(我有一个带有API密钥的google map自动完成搜索脚本,它工作正常,但是,下拉建议字体很小,用户看不到它们。)
Here's my script :
(这是我的脚本:)
<label for="fname" style="font-size:35px;font-family:verdana;margin-left:50px;">Enter Your Pick Up Address</label>
<input type="text" class="autocomplete" style="text-decoration:none;font-size:35px;font-family:verdana;margin-left:50px;" id="ac2" name="pickup" required >
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=API KEY&libraries=places"></script>
<script type="text/javascript">//<![CDATA[
var VanillaRunOnDomReady = function() {
function initialize() {
var acInputs = document.getElementsByClassName("autocomplete");
for (var i = 0; i < acInputs.length; i++) {
var autocomplete = new google.maps.places.Autocomplete(acInputs[i]);
autocomplete.inputId = acInputs[i].id;
google.maps.event.addListener(autocomplete, 'place_changed', function () {
document.getElementById("log").innerHTML = 'You used input with id ' + this.inputId;
});
}
}
initialize();
}
var alreadyrunflag = 0;
if (document.addEventListener)
document.addEventListener("DOMContentLoaded", function(){
alreadyrunflag=1;
VanillaRunOnDomReady();
}, false);
else if (document.all && !window.opera) {
document.write('<script type="text/javascript" id="contentloadtag" defer="defer" src="javascript:void(0)"></script>');
var contentloadtag = document.getElementById("contentloadtag")
contentloadtag.onreadystatechange=function(){
if (this.readyState=="complete"){
alreadyrunflag=1;
VanillaRunOnDomReady();
}
}
}
window.onload = function(){
setTimeout("if (!alreadyrunflag){VanillaRunOnDomReady}", 0);
}
I tried playing with the input font-size CSS, but it does only affect the one that I am typing in it but not the dropdown suggestions.
(我尝试使用输入字体的CSS,但是它只会影响我在其中输入的CSS,而不会影响下拉菜单。)
Any help is greatly appreciated.
(任何帮助是极大的赞赏。)
ask by Hareesh kumar translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…