Silverlight网站浏览器缩放问题
我开发了一个Silverlight 网站。我当前面临的问题是当我使用浏览器缩放时,它会显示网站的放大版本,而没有浏览器滚动条。内容被剪辑。 请检查这些显示我的问题的图像。
http://demo.digi-corp.com/withzoom.jpg
http://demo.digi-corp.com/withoutzoom.jpg
以下是我的设计代码silverlight 对象所在的 aspx 页面主办。
html, body
{
height: 100%;
width:100%;
overflow:auto;
}
body
{
padding: 0;
margin: 0;
}
#silverlightControlHost
{
height: 100%;
text-align: left;
width: 100%;
}
I have developed a Silverlight website. The problem i am facing currently is when i use the browser zoom, it displays the magnified version of the site without browser scrollbars. The content is clipped.
Please check these images which displays my problem.
http://demo.digi-corp.com/withzoom.jpg
http://demo.digi-corp.com/withoutzoom.jpg
The following is the design code in my aspx page where the silverlight object is hosted.
<form id="form1" runat="server" style="height: 100%;">
<div id="silverlightControlHost" style="background: #9EEE69;">
<object id="silverlightObject" data="data:application/x-silverlight-2," type="application/x-silverlight-2"
width="100%" height="100%">
html, body
{
height: 100%;
width:100%;
overflow:auto;
}
body
{
padding: 0;
margin: 0;
}
#silverlightControlHost
{
height: 100%;
text-align: left;
width: 100%;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
创建 javascript 函数
function bodyLoadEvent()
{
this.form1.style.height = (parseInt(document.body.offsetHeight) - 5).toString() + "px";
this.form1.style.width = (parseInt(document.body.offsetWidth) - 5).toString() + "px";
document.getElementById("myhtmlbody").style.height = (parseInt(document.body.offsetHeight) - 5).toString() + "px";
document.getElementById("myhtmlbody").style.width= (parseInt(document.body.offsetWidth) - 5).toString() + "px";
并
在身体负载时调用此函数。
IE
create javascript function
function bodyLoadEvent()
{
this.form1.style.height = (parseInt(document.body.offsetHeight) - 5).toString() + "px";
this.form1.style.width = (parseInt(document.body.offsetWidth) - 5).toString() + "px";
document.getElementById("myhtmlbody").style.height = (parseInt(document.body.offsetHeight) - 5).toString() + "px";
document.getElementById("myhtmlbody").style.width= (parseInt(document.body.offsetWidth) - 5).toString() + "px";
}
and call this function on body load.
i.e.
<body onload="bodyLoadEvent();">
<form id="form1" runat="server" style="height:100%;">
.......
</form>
</body>
@brijesh;您必须在
body
标记中定义min-width
,如下所示:@brijesh; you have to define
min-width
in yourbody
tag like this: