\t","url":"https://sir.kr/boards/tip/10835","author":{"@type":"Person","name":"senseme","url":"https://sir.kr/profile/fd8d8956-5b99-4cbc-9e08-367f8488486f"},"interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":6}],"datePublished":"2013-03-03T01:40:15+09:00","dateModified":"2015-12-02T22:37:55+09:00","comment":[{"@type":"Comment","text":"감사요~","author":{"@type":"Person","name":"쉽다zzz"},"datePublished":"2013-04-05T09:20:42+09:00"},{"@type":"Comment","text":"꼭 필요한데 꿀같으 소스네요","author":{"@type":"Person","name":"쫠스"},"datePublished":"2013-06-21T11:46:29+09:00"},{"@type":"Comment","text":"꼭 해봐야지..^^","author":{"@type":"Person","name":"그렌트힐"},"datePublished":"2015-07-31T17:59:13+09:00"},{"@type":"Comment","text":"어떻게 써먹는 팁인지?\r\n\r\nhttp://codepen.io/anon/pen/WreeBV?editors=110\r\n\r\n높이가 자동 조절 안 되는 것 같아요.","author":{"@type":"Person","name":"홈짱"},"datePublished":"2015-12-01T23:49:25+09:00"},{"@type":"Comment","text":"크로스 브라우징때문입니다.\r\n자신의 사용되고있는 서비스에 페이지가 존재해야합니다.","author":{"@type":"Person","name":"senseme"},"datePublished":"2015-12-02T09:52:25+09:00"},{"@type":"Comment","text":"원래 화면에 꽉 차게 나와야 하는 거 아닌가요?\r\n\r\nindex.php 파일에 넣어봐도 위 링크와 동일한 높이로 보이던데요.","author":{"@type":"Person","name":"홈짱"},"datePublished":"2015-12-02T22:37:55+09:00"}]}
s

iframe 높이 자동조절 스크립트

<script language='javascript'>
<!--
function changeHeight() {
//아이프레임 안쪽 페이지 높이를 먼저구하신후
var the_height=document.getElementById('content').contentWindow.document.body.scrollHeight;
// 아이프레임 높이를 바꿔주시면 됩니다.
document.getElementById('content').height=the_height; }
//-->
</script>


<iframe id='content'
frameborder=0
width=100%
scrolling=no
onLoad="changeHeight();"
src='content.php'>
</iframe>
|

댓글 6개

꼭 필요한데 꿀같으 소스네요
꼭 해봐야지..^^
어떻게 써먹는 팁인지?

http://codepen.io/anon/pen/WreeBV?editors=110

높이가 자동 조절 안 되는 것 같아요.
크로스 브라우징때문입니다.
자신의 사용되고있는 서비스에 페이지가 존재해야합니다.
원래 화면에 꽉 차게 나와야 하는 거 아닌가요?

index.php 파일에 넣어봐도 위 링크와 동일한 높이로 보이던데요.
댓글을 작성하시려면 로그인이 필요합니다.

팁게시판

디자인과 관련된 유용한 정보를 공유하세요. 질문은 상단의 QA에서 해주시기 바랍니다.

+
제목 글쓴이 날짜 조회
13년 전 조회 1,315
13년 전 조회 1,701
13년 전 조회 1,386
13년 전 조회 2,444
13년 전 조회 1,650
13년 전 조회 2,244
13년 전 조회 2,153
13년 전 조회 1,785
13년 전 조회 4,564
13년 전 조회 2,710
13년 전 조회 2,866
13년 전 조회 1,261
13년 전 조회 8,533
13년 전 조회 3,342
13년 전 조회 2,695
13년 전 조회 5,347
13년 전 조회 3,422
13년 전 조회 1.3만
13년 전 조회 3,932
13년 전 조회 1,506
13년 전 조회 1,279
13년 전 조회 3,253
13년 전 조회 888
13년 전 조회 1,807
13년 전 조회 3,659