Flex 3、iFrame、滚动条

发布于 2024-10-14 13:19:49 字数 1710 浏览 5 评论 0原文

我在 Flex 3 项目中使用 iFrame。问题是,如果用户在小浏览器窗口中打开我的网站,他们不会看到滚动条。我该如何解决这个问题?有没有办法强制浏览器显示滚动条?

如果我将主应用程序设置为 horizo​​ntalScrollPolicy="on" VerticalScrollPolicy="on""auto",那么当您向下滚动时,iFrame 会粘在顶部浏览器窗口并遮盖内容。

在主应用程序中:

在应用程序标记中,我得到:

 horizontalScrollPolicy="off" verticalScrollPolicy="off"

我的 iFrame 如下所示:

<flexiframe:IFrame id="myiFrame"  source="http://www.mysite.com/myStuff.html"  x="315" y="20" width="498" height="65" scrollPolicy="off"   />

在 HTML 模板中,我在 swf 周围放置了一个 div 并添加了 css:

<style type="text/css">
    #blockwrapper{
    display: block;
    margin:0;
    padding:0;
    width: 980px;
    height: 800px;
    }
</style>



<div id="blockwrapper">
   <noscript>
      <object classid="clsid:D26CDA6E-AE6D-11cf-96B8-444553540000"
    id="${application}" width="${width}" height="${height}"
    codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
    <param name="movie" value="${swf}.swf" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="${bgcolor}" />
    <param name="allowScriptAccess" value="sameDomain" />
    <embed src="${swf}.swf" quality="high" bgcolor="${bgcolor}"
    width="${width}" height="${height}" name="${application}" align="middle"
    play="true"
    loop="false"
    quality="high"
    allowScriptAccess="sameDomain"
    type="application/x-shockwave-flash"
    pluginspage="http://www.adobe.com/go/getflashplayer">
    </embed>
    </object>
   </noscript>
 </div>

有什么建议吗?

谢谢。

I'm using an iFrame in a Flex 3 project. The problem is that if the user opens my site in a small browser window, they don't get scrollbars. How can I solve this problem? Is there a way to force the browser to put up scrollbars?

If I set the main app to horizontalScrollPolicy="on" verticalScrollPolicy="on" or to "auto", then as you scroll down, the iFrame is stuck to the top of the browser window and obscures the content.

In the main app:

In the Application tag, I've got:

 horizontalScrollPolicy="off" verticalScrollPolicy="off"

My iFrame looks like:

<flexiframe:IFrame id="myiFrame"  source="http://www.mysite.com/myStuff.html"  x="315" y="20" width="498" height="65" scrollPolicy="off"   />

In the HTML Template, I've put a div around the swf and added css:

<style type="text/css">
    #blockwrapper{
    display: block;
    margin:0;
    padding:0;
    width: 980px;
    height: 800px;
    }
</style>



<div id="blockwrapper">
   <noscript>
      <object classid="clsid:D26CDA6E-AE6D-11cf-96B8-444553540000"
    id="${application}" width="${width}" height="${height}"
    codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
    <param name="movie" value="${swf}.swf" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="${bgcolor}" />
    <param name="allowScriptAccess" value="sameDomain" />
    <embed src="${swf}.swf" quality="high" bgcolor="${bgcolor}"
    width="${width}" height="${height}" name="${application}" align="middle"
    play="true"
    loop="false"
    quality="high"
    allowScriptAccess="sameDomain"
    type="application/x-shockwave-flash"
    pluginspage="http://www.adobe.com/go/getflashplayer">
    </embed>
    </object>
   </noscript>
 </div>

Any suggestions?

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

吹泡泡o 2024-10-21 13:19:49

我已经成功了。下面是我必须做的:

A)

<style>
body { margin: 0px; overflow:scroll }
</style>

<style type="text/css">
#blockwrapper{
    display: block;
    margin:0;
    padding:0;
    width: 960px;
    height: 800px;
}
</style>

B)我将应用程序标签中的Flex应用程序的宽度和高度设置为与div中的相同。

谢谢。

-拉克斯米迪

I've got it working. Below is what I had to do:

A)

<style>
body { margin: 0px; overflow:scroll }
</style>

<style type="text/css">
#blockwrapper{
    display: block;
    margin:0;
    padding:0;
    width: 960px;
    height: 800px;
}
</style>

B) I set the flex app's width and height in the Application tag to the same as that in the div.

Thank you.

-Laxmidi

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文