爲什麼元素A不可見?看來appendChild()函數被忽略。我只能看到B元素。 (元素是可見的,如果我把它控制內部):(appendChild不能在Google地圖中使用
var a = document.createElement('A');
a.style.width = '50px';
a.style.height = '50px';
a.style.cursor = 'pointer';
a.style.backgroundColor = 'rgba(10,20,30,1.0)';
var b = document.createElement('B');
b.style.width = '200px';
b.style.height = '200px';
b.style.backgroundColor = 'rgba(230,230,230,0.6)';
b.appendChild(a);
map.controls[google.maps.ControlPosition.LEFT].push(b);
非常感謝你,米奇! :) – thehorseisbrown
@thehorseisbrown不客氣 – Michelangelo