// 중앙정렬에서 화면의 리사이즈가 있더라도 레이어 위치를 고정함
// center, layer, div, resize, absolute, relative
jQuery(document).ready(function() {
jQuery(window).bind("resize", function() {
jQuery("#mypost").css("top", 67).css("left", ( document.body.clientWidth / 2) + 450).show();
}).trigger("resize");
});
<div id="mypost" style="display:none; position:absolute; width:150px; z-index:1;">
내글
</div>
// center, layer, div, resize, absolute, relative
jQuery(document).ready(function() {
jQuery(window).bind("resize", function() {
jQuery("#mypost").css("top", 67).css("left", ( document.body.clientWidth / 2) + 450).show();
}).trigger("resize");
});
<div id="mypost" style="display:none; position:absolute; width:150px; z-index:1;">
내글
</div>
[이 게시물은 관리자님에 의해 2011-10-31 16:55:28 jQuery에서 이동 됨]
댓글 2개
15년 전
<div style="position:relative;">
<div id="mypost" style="position:absolute; width:150px; z-index:1;top:10px;left:10px;">
내글
</div>
</div>
요래 하면 위치가 고정이 되긴 하지만서도..
<div id="mypost" style="position:absolute; width:150px; z-index:1;top:10px;left:10px;">
내글
</div>
</div>
요래 하면 위치가 고정이 되긴 하지만서도..
14년 전
이거 응용하면 중앙 정렬인 사이트에 좌우로 배너같은걸 넣기 좋습니다.
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 30 |
아우겐나이스
|
21년 전 | 4032 | |
| 29 |
아우겐나이스
|
21년 전 | 4430 | |
| 28 |
아우겐나이스
|
21년 전 | 3449 | |
| 27 | 21년 전 | 5814 | ||
| 26 | 21년 전 | 3084 | ||
| 25 | 21년 전 | 6063 | ||
| 24 | 18년 전 | 3635 | ||
| 23 | 21년 전 | 3627 | ||
| 22 | 21년 전 | 4235 | ||
| 21 | 21년 전 | 3811 | ||
| 20 | 21년 전 | 4209 | ||
| 19 | 21년 전 | 6668 | ||
| 18 | 21년 전 | 4726 | ||
| 17 | 21년 전 | 6969 | ||
| 16 | 21년 전 | 4160 | ||
| 15 | 21년 전 | 2614 | ||
| 14 | 21년 전 | 4959 | ||
| 13 | 21년 전 | 3391 | ||
| 12 |
Recluse
|
21년 전 | 3863 | |
| 11 |
아우겐나이스
|
21년 전 | 3558 | |
| 10 |
Recluse
|
21년 전 | 3386 | |
| 9 | 21년 전 | 3964 | ||
| 8 | 21년 전 | 5152 | ||
| 7 | 21년 전 | 4749 | ||
| 6 | 21년 전 | 5659 | ||
| 5 | 21년 전 | 4102 | ||
| 4 | 21년 전 | 4821 | ||
| 3 | 21년 전 | 4733 | ||
| 2 | 21년 전 | 3231 | ||
| 1 | 22년 전 | 4331 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기