将加载的内容限制为div [英] Restrict loaded content to a div
本文介绍了将加载的内容限制为div的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个基本上是这样的页面:
I have a page that is basically this:
<div id="thelist" style="height:100%; width:100%; position:relative"></div>
<script type="text/javascript">
$('#thelist').load('other.aspx', function () { });
</script>
问题是:当内容加载时,它扩展到div的边界之外环境控制。有一种方法来限制这个内容到div,只是有div滚动包括所有的内容?谢谢。
The problem is this: When the content is loaded, it expands outside the boundaries of the div and into surrounding controls. Is there a way to restrict this content to the div and just have the div scroll to include all the contents? Thanks.
推荐答案
是的,你应该能够使用css overflow
属性设置为 auto
或滚动
。
这里一个好的文章详细介绍了ins和out,这里是 w3c规格。
Yes, you should be able to do this with the css overflow
property setting it to either auto
or scroll
.
Here's a good article detailing the ins and out and here is the w3c specification.
这篇关于将加载的内容限制为div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文