지도/로컬 API에 대한 문의게시판입니다.
.wrap {position: absolute;left: 0;bottom: 65px; width: 250px;height: 130px; margin-left: -138px;text-align: left;overflow: hidden;font-size: 12px;font-family: ‘Malgun Gothic’, dotum, ‘돋움’, sans-serif;line-height: 1.5; padding-bottom:20px;}
.wrap * {padding: 0;margin: 0;}
.wrap .info {width: 250px;height: 120px;border-radius: 5px;border-bottom: 2px solid #ccc;border-right: 1px solid #ccc;overflow: hidden;background: #fff;}
.wrap .info:nth-child(1) {border: 0;box-shadow: 0px 1px 2px #888;}
.info .title {padding: 5px 0 0 10px; color:red; background: #eee; border-bottom: 1px solid #ddd; font-size: 18px; font-weight: bold;}
.info .close {position: absolute;top: 10px;right: 10px;color: #888;width: 30px;height: 17px; border:none;}
.info .close:hover {cursor: pointer;}
.info .body {position: relative;overflow: scroll;}
.info .desc {position: relative;height: 75px;}
.desc .time {white-space:normal; font-weight: 600; padding:15px;}
kakao map 에서 제공해주신 sample 코드 중 오버레이를 개발하고 있는데
title div만 뜨질 않네요 ,
위 코드는 css 이고
var content=document.createElement(‘div’);
content.className=“wrap”;
var info=document.createElement('div');
info.className="info";
var title=document.createElement('div');
title.className="title";
title.innerHTML=html[i].name;
var closeBtn = document.createElement('button');
closeBtn.className="close";
closeBtn.innerHTML = '닫기';
closeBtn.onclick = function () {
overlay.setMap(null);
};
var body=document.createElement('div');
body.className="body";
var desc=document.createElement('div');
desc.className="desc";
var time=document.createElement('div');
time.className="time";
time.innerHTML=html[i].time;
content.appendChild(info);
info.appendChild(title);
info.appendChild(body);
title.appendChild(closeBtn);
body.appendChild(desc);
desc.appendChild(time);
overlay.setContent(content);
div 박스는 이런식으로 추가했습니다ㅠㅠ
title만 안뜨는데 코드 어디에 문제가 있는걸까요?
html은 json api 불러온 것입니다