【发布时间】:2016-09-27 21:35:30
【问题描述】:
为什么元素 A 不可见?似乎 appendChild() 函数被忽略了。我只能看到 B 元素。 (如果我将元素 A 推到控件内,它是可见的):(
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);
【问题讨论】: