따라다니는게 아니라 항상 제일 하단에 스티커처럼 고정되어 있는것처럼 할려면 어떻게 해야하나요?
참고로 경향신문 모바일입니다.
<script type="text/javascript">
var adObj = document.createElement("DIV");
adObj.id="dualad_div34";
adObj.style.zindex="999";
adObj.style.position="absolute";
adObj.style.bottom="0px";
adObj.style.left="0px";
adObj.style.width="100%";
adObj.style.height="50px";
document.body.appendChild(adObj);
var adObj = document.createElement("DIV");
adObj.id="dualad_div34";
adObj.style.zindex="999";
adObj.style.position="absolute";
adObj.style.bottom="0px";
adObj.style.left="0px";
adObj.style.width="100%";
adObj.style.height="50px";
document.body.appendChild(adObj);
var daum_adam_vars = {
position : 'MIDDLE', // TOP (화면상단) | BOTTOM (화면 하단) | MIDDLE (화면 중간 삽입. bannerDivId 지정 필요)
bannerDivId : 'dualad_div34', // position : 'MIDDLE' 인 경우, 광고를 삽입할 DIV 테그의 ID 값.
};
position : 'MIDDLE', // TOP (화면상단) | BOTTOM (화면 하단) | MIDDLE (화면 중간 삽입. bannerDivId 지정 필요)
bannerDivId : 'dualad_div34', // position : 'MIDDLE' 인 경우, 광고를 삽입할 DIV 테그의 ID 값.
};
function setAdPosition(target, position, topLimit, btmLimit) {
if (!target) return false;
var obj = target;
obj.initTop = position;
obj.topLimit = topLimit;
obj.bottomLimit = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight) - btmLimit - obj.offsetHeight;
obj.style.position = "absolute";
obj.top = obj.initTop;
obj.left = obj.initLeft;
if (typeof (window.pageYOffset) == "number") {
obj.getTop = function () {
return window.pageYOffset;
}
} else if (typeof (document.documentElement.scrollTop) == "number") {
obj.getTop = function () {
return Math.max(document.documentElement.scrollTop, document.body.scrollTop);
}
} else {
obj.getTop = function () {
return 0;
}
}
if (self.innerHeight) {
obj.getHeight = function () {
return self.innerHeight;
}
} else if (document.documentElement.clientHeight) {
obj.getHeight = function () {
return document.documentElement.clientHeight;
}
} else {
obj.getHeight = function () {
return 500;
}
}
if (obj.initTop > 0) {
pos = obj.getTop() + obj.initTop;
} else {
pos = obj.getTop() + obj.getHeight() + obj.initTop;
}
if (pos > obj.bottomLimit) pos = obj.bottomLimit;
if (pos < obj.topLimit) pos = obj.topLimit;
obj.style.top = (obj.top + pos) + "px";
}
if (!target) return false;
var obj = target;
obj.initTop = position;
obj.topLimit = topLimit;
obj.bottomLimit = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight) - btmLimit - obj.offsetHeight;
obj.style.position = "absolute";
obj.top = obj.initTop;
obj.left = obj.initLeft;
if (typeof (window.pageYOffset) == "number") {
obj.getTop = function () {
return window.pageYOffset;
}
} else if (typeof (document.documentElement.scrollTop) == "number") {
obj.getTop = function () {
return Math.max(document.documentElement.scrollTop, document.body.scrollTop);
}
} else {
obj.getTop = function () {
return 0;
}
}
if (self.innerHeight) {
obj.getHeight = function () {
return self.innerHeight;
}
} else if (document.documentElement.clientHeight) {
obj.getHeight = function () {
return document.documentElement.clientHeight;
}
} else {
obj.getHeight = function () {
return 500;
}
}
if (obj.initTop > 0) {
pos = obj.getTop() + obj.initTop;
} else {
pos = obj.getTop() + obj.getHeight() + obj.initTop;
}
if (pos > obj.bottomLimit) pos = obj.bottomLimit;
if (pos < obj.topLimit) pos = obj.topLimit;
obj.style.top = (obj.top + pos) + "px";
}
document.body.addEventListener('touchstart', function (e) {
var evt = e || window.event;
var target = evt.target || evt.srcElement;
var node = target.parentNode;
var hide = true;
while (node) {
if (node.id === daum_adam_vars.bannerDivId) {
hide = false;
break;
}
node = node.parentNode;
}
if (hide) {
document.getElementById('dualad_div34').style.display = 'none';
}
}, false);
window.addEventListener('scroll', function () {
setAdPosition(document.getElementById("dualad_div34"), - 30, 0, - 30);
document.getElementById('dualad_div34').style.display = 'block';
}, false);
var evt = e || window.event;
var target = evt.target || evt.srcElement;
var node = target.parentNode;
var hide = true;
while (node) {
if (node.id === daum_adam_vars.bannerDivId) {
hide = false;
break;
}
node = node.parentNode;
}
if (hide) {
document.getElementById('dualad_div34').style.display = 'none';
}
}, false);
window.addEventListener('scroll', function () {
setAdPosition(document.getElementById("dualad_div34"), - 30, 0, - 30);
document.getElementById('dualad_div34').style.display = 'block';
}, false);
window.addEventListener('load', function() {
if (navigator.userAgent.indexOf('Safari')!=-1){
setTimeout(scrollTo,0,0,1);
}else{
window.scrollTo(0,1);
}
setTimeout("setAdPosition(document.getElementById('dualad_div34'), -24, 0, -24)",1);
}, false);
</script>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 330 |
prosper
|
20년 전 | 2288 | |
| 329 |
prosper
|
20년 전 | 1919 | |
| 328 |
prosper
|
20년 전 | 1711 | |
| 327 | 20년 전 | 3778 | ||
| 326 | 20년 전 | 4865 | ||
| 325 |
hwatta
|
20년 전 | 2493 | |
| 324 |
|
20년 전 | 3150 | |
| 323 | 20년 전 | 5875 | ||
| 322 |
hwatta
|
20년 전 | 2860 | |
| 321 |
hwatta
|
20년 전 | 2332 | |
| 320 |
yesmoa
|
20년 전 | 4583 | |
| 319 | 20년 전 | 2698 | ||
| 318 | 20년 전 | 2244 | ||
| 317 |
kyodon
|
20년 전 | 2765 | |
| 316 | 20년 전 | 2589 | ||
| 315 |
|
20년 전 | 2890 | |
| 314 |
|
20년 전 | 3349 | |
| 313 |
|
20년 전 | 2654 | |
| 312 |
yesmoa
|
20년 전 | 4734 | |
| 311 | 20년 전 | 3288 | ||
| 310 |
홀로남은자
|
20년 전 | 4579 | |
| 309 | 20년 전 | 3014 | ||
| 308 | 20년 전 | 4145 | ||
| 307 | 20년 전 | 4382 | ||
| 306 | 20년 전 | 7044 | ||
| 305 | 20년 전 | 3877 | ||
| 304 | 20년 전 | 2776 | ||
| 303 |
크리스탈처럼
|
20년 전 | 4416 | |
| 302 | 20년 전 | 2217 | ||
| 301 |
|
20년 전 | 4335 | |
| 300 | 20년 전 | 3820 | ||
| 299 | 20년 전 | 2637 | ||
| 298 | 20년 전 | 4849 | ||
| 297 |
|
20년 전 | 2538 | |
| 296 | 20년 전 | 4545 | ||
| 295 | 20년 전 | 3577 | ||
| 294 | 20년 전 | 3598 | ||
| 293 | 20년 전 | 3827 | ||
| 292 | 20년 전 | 3223 | ||
| 291 |
yesmoa
|
20년 전 | 5962 | |
| 290 | 20년 전 | 2949 | ||
| 289 | 20년 전 | 5870 | ||
| 288 |
|
20년 전 | 2388 | |
| 287 |
|
20년 전 | 1819 | |
| 286 |
|
20년 전 | 2158 | |
| 285 |
|
20년 전 | 3551 | |
| 284 |
|
20년 전 | 2045 | |
| 283 |
|
20년 전 | 4406 | |
| 282 | 20년 전 | 3387 | ||
| 281 |
|
20년 전 | 2218 | |
| 280 |
|
20년 전 | 7822 | |
| 279 | 20년 전 | 5569 | ||
| 278 | 20년 전 | 3005 | ||
| 277 |
|
20년 전 | 5578 | |
| 276 | 20년 전 | 2368 | ||
| 275 | 20년 전 | 2625 | ||
| 274 | 20년 전 | 2406 | ||
| 273 | 20년 전 | 2241 | ||
| 272 | 20년 전 | 2169 | ||
| 271 | 20년 전 | 2637 | ||
| 270 | 20년 전 | 2676 | ||
| 269 | 20년 전 | 2518 | ||
| 268 | 20년 전 | 2704 | ||
| 267 | 20년 전 | 2386 | ||
| 266 | 20년 전 | 2577 | ||
| 265 | 20년 전 | 3519 | ||
| 264 |
|
20년 전 | 5382 | |
| 263 |
|
20년 전 | 3747 | |
| 262 | 20년 전 | 3205 | ||
| 261 |
허저비
|
20년 전 | 5948 | |
| 260 |
|
20년 전 | 5724 | |
| 259 | 20년 전 | 4151 | ||
| 258 | 20년 전 | 2385 | ||
| 257 | 20년 전 | 3207 | ||
| 256 | 20년 전 | 1920 | ||
| 255 | 20년 전 | 1590 | ||
| 254 | 20년 전 | 3160 | ||
| 253 | 20년 전 | 3556 | ||
| 252 | 20년 전 | 5140 | ||
| 251 | 20년 전 | 5831 | ||
| 250 | 20년 전 | 3689 | ||
| 249 | 20년 전 | 5036 | ||
| 248 | 20년 전 | 3305 | ||
| 247 | 20년 전 | 3659 | ||
| 246 |
|
20년 전 | 7968 | |
| 245 |
|
20년 전 | 5931 | |
| 244 | 20년 전 | 4498 | ||
| 243 |
|
20년 전 | 4078 | |
| 242 | 20년 전 | 2809 | ||
| 241 | 20년 전 | 2755 | ||
| 240 | 20년 전 | 2392 | ||
| 239 | 20년 전 | 1681 | ||
| 238 |
아우겐나이스
|
20년 전 | 2288 | |
| 237 |
email
|
20년 전 | 3703 | |
| 236 | 20년 전 | 4186 | ||
| 235 | 20년 전 | 10477 | ||
| 234 | 20년 전 | 5088 | ||
| 233 | 20년 전 | 3392 | ||
| 232 | 20년 전 | 3231 | ||
| 231 | 20년 전 | 3874 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기