iFrame高度调整大小

时间:2012-11-01 10:27:30

标签: iframe resize autoscroll

需要将帧高更改为页面内容。 在框架中将是一个评论块。 对不起4我的英文:P 问题是HERE

<script>
$(document).ready(function(){
$(".group1").colorbox({rel:'group1'});
$(".group2").colorbox({rel:'group2', transition:"fade"});
$(".group3").colorbox({rel:'group3', transition:"none", width:"800px", height:"75%"});
$(".group4").colorbox({rel:'group4', slideshow:true});
$(".iframe").colorbox({iframe:true, width:"1057px", height:"750px"});
$("#click").click(function(){ 
$('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text;
return false;
});
});
</script>

<a class='iframe' href="Gallery/complete/photo0001489_61132.html"><img src="Gallery/complete/min/1.jpg" width="200px"></a>

1 个答案:

答案 0 :(得分:0)

不太确定你要求的是什么,但如果你使用jQuery,这应该可以解决问题:

 $('.element').height($('.other-element').height());

你也可以做到

 $('.element').css({
'height':$('.other-element').height()
});
相关问题