首页 > 解决方案 > SharePoint 网页自动调整大小

问题描述

我可以在编辑源中放入什么代码来设置 SharePoint 网站的宽度和高度?

<style type="text/css">

body {

width: 100%;

height: 100%;

}

</style>

上面的脚本不起作用。

标签: htmlsharepointautosize

解决方案


以下样式供您参考。

<style type="text/css">
body{
    width: 100% !important;
    height: 100% !important;
}
#s4-workspace{
    width: 100% !important;
    height: auto !important;
}
</style>

在 SharePoint 网站中,我建议您创建一个响应式母版页来满足您的要求。

请参阅此处的解决方案:SharePoint Branding - 响应式母版页


推荐阅读