页面很简单,用的是jquery的拖动功能。
没加iframe时,IE中拖动性能正常,加入iframe后,拖动时感觉很卡,但是firefox中基本正常。<!DOCTYPE html>
<html lang="en">
<head>
    <title>拖动</title>
    <script type="text/javascript" src="./js/jquery-ui-1.8.14.custom/js/jquery-1.5.1.min.js"></script>
    <script type="text/javascript" src="./js/jquery-ui-1.8.14.custom/js/jquery-ui-1.8.14.custom.min.js"></script>
    <style type="text/css">
        #draggable
        {
            width: 800px;
            height: 600px;
            padding: 0.5em;
            background-color:blue;
            border: solid 1px blue;
        }
        .containerdiv
        {
            width: 90%;
            height: 90%;
            background-color:Gray;
            border: 1px solid #ddd;
        }
    </style>
    <script type="text/javascript">
        $(function () {
            $("#draggable").draggable();
        });
    </script>
</head>
<body id="demos" style="height:100%;">
    <div class="containerdiv" style="overflow: hidden; position: absolute;">
        <div>
            <div style="position: relative;" id="draggable">
                <p>
                    Drag me around</p>
                    <iframe src="http://www.weibo.com" style="width:100%;height:100%;"/>
            </div>
        </div>
    </div>
</body>
</html>

解决方案 »

  1.   

    <iframe src="http://www.weibo.com" style="width:100%;height:100%;"/>应该跟你iframe进来的页面有关,你这是把sina的微博引入进来你换成本地的页面试试,肯定就没那么卡了~·
      

  2.   

    当拖动之前将iframe隐藏,换成显示一个div的虚线框,拖拽完成之后隐藏虚线框且将iframe显示到虚线框位置
      

  3.   


    但是我希望拖动的时候能看到iframe中的内容。呵呵
      

  4.   

    那就不可能实现。起码目前不可以实现。建议拖动的时候把iframe给hide,拖动结束之后,给show,就不会卡了。