sharepoint 2013 创建母版页

一、创建新的母版页, 并添加了新的样式表

1.从CodePlex 上获得Starter Master Pages for SharePoint 2010

或复制以下母版代码

sharepoint 2013 创建母版页sharepoint 2013 创建母版页
<%@Master language=;</span>
                                    </a>
                                    <span ;</span>
                                    </a>
                                    <span " ExpandImageUrl="/_layouts/15/images/tvclosed.png?rev=23" ExpandImageUrlRtl="/_layouts/15/images/tvclosedrtl.png?rev=23" CollapseImageUrl="/_layouts/15/images/tvopen.png?rev=23" CollapseImageUrlRtl="/_layouts/15/images/tvopenrtl.png?rev=23" NoExpandImageUrl="/_layouts/15/images/tvblank.gif?rev=23"></SharePoint:SPTreeView>
                                            </SharePoint:SPRememberScroll>
                                            </Template_Controls>
                                        </SharePoint:DelegateControl>
                                    </SharePoint:SPNavigationManager>
                                
                                    <!-- ===== STARTER: Site Contents Link ==================================================================================== -->
                                    <asp:ContentPlaceHolder id="PlaceHolderQuickLaunchBottom" runat="server">
                                        <div class="ms-core-listMenu-verticalBox"><SharePoint:ClusteredSPLinkButton runat="server" id="idNavLinkViewAll" PermissionsString="ViewFormPages" NavigateUrl="~site/_layouts/15/viewlsts.aspx" Text="<%$Resources:wss,AllSiteContentMore%>" accesskey="<%$Resources:wss,quiklnch_allcontent_AK%>" CssClass="ms-core-listMenu-item ms-core-listMenu-heading" /></div>
                                    </asp:ContentPlaceHolder>
                                </div>
                            </asp:ContentPlaceHolder>
                        </SharePoint:AjaxDelta>
                    </div>            
                    
                    <!-- ===== STARTER: Main Content ========================================================================================== -->
                    <div id="contentBox">
                        <SharePoint:AjaxDelta ID="DeltaPlaceHolderMain" IsMainContent="true" runat="server">
                            <!-- ===== STARTER: Main Placeholder gets replaced with content of the page ======================================= -->
                            <asp:ContentPlaceHolder ID="PlaceHolderMain" runat="server" />
                        </SharePoint:AjaxDelta>
                    </div>
                </div>
            </div>
            <!-- ===== STARTER: Main Scrolling Body Ends Here ================================================================================= -->
            
            <!-- ===== STARTER: Needed for form stuff ========================================================================================= -->
            <SharePoint:AjaxDelta id="DeltaFormDigest" BlockElement="true" runat="server">
                <asp:ContentPlaceHolder id="PlaceHolderFormDigest" runat="server">
                    <SharePoint:formdigest runat="server" />
                </asp:ContentPlaceHolder>
            </SharePoint:AjaxDelta>
        
            <!-- ===== STARTER: Hidden Placeholders =========================================================================================== -->    
            <asp:ContentPlaceHolder id="PlaceHolderBodyAreaClass" Visible="False" runat="server" /><asp:ContentPlaceHolder id="PlaceHolderTitleAreaClass" Visible="False" runat="server" /><asp:ContentPlaceHolder id="PlaceHolderTitleBreadcrumb" Visible="False" runat="server" /><asp:ContentPlaceHolder id="PlaceHolderGlobalNavigationSiteMap" Visible="False" runat="server" /><asp:ContentPlaceHolder id="PlaceHolderGlobalNavigation" Visible="False" runat="server" /><asp:ContentPlaceHolder id="PlaceHolderHorizontalNav" Visible="False" runat="server" /><asp:ContentPlaceHolder id="PlaceHolderTopNavBar" Visible="False" runat="server" /><asp:ContentPlaceHolder id="PlaceHolderSiteName" Visible="False" runat="server" /><asp:ContentPlaceHolder id="PlaceHolderPageImage" Visible="False" runat="server" /><asp:ContentPlaceHolder id="PlaceHolderTitleLeftBorder" Visible="False" runat="server" /><asp:ContentPlaceHolder id="PlaceHolderMiniConsole" Visible="False" runat="server" /><asp:ContentPlaceHolder id="PlaceHolderTitleRightMargin" Visible="False" runat="server" /><asp:ContentPlaceHolder id="PlaceHolderTitleAreaSeparator" Visible="False" runat="server" /><asp:ContentPlaceHolder id="PlaceHolderNavSpacer" Visible="False" runat="server" /><asp:ContentPlaceHolder id="PlaceHolderLeftNavBarBorder" Visible="False" runat="server" /><asp:ContentPlaceHolder id="PlaceHolderBodyLeftBorder" Visible="False" runat="server" /><asp:ContentPlaceHolder id="PlaceHolderBodyRightMargin" Visible="False" runat="server" /><asp:ContentPlaceHolder id="WSSDesignConsole" Visible="False" runat="server" />
                
        </SharePoint:SharePointForm>
    
        <!-- ===== STARTER: Adds extra stuff like another form for Survey management ====================================================== -->    
        <SharePoint:AjaxDelta id="DeltaPlaceHolderUtilityContent" runat="server">
            <asp:ContentPlaceHolder id="PlaceHolderUtilityContent" runat="server"/>
        </SharePoint:AjaxDelta>
    
    </body>
    
    <!-- Created from Starter SP2013 Master Page originally by Randy Drisgill (http://blog.drisgill.com) - April 21, 2013 -->
</SharePoint:SPHtmlTag>

CSS样式

sharepoint 2013 创建母版页sharepoint 2013 创建母版页
/* used by the Starter Publishing master page for fixed width display */
.customWidth {
    width: 980px;
    margin: auto;
}

/* used to reset the ootb styles on the title row tag in the Starter Collab master page; used for the fullscreen button in SP */
#s4-titlerow {
    background-color: transparent;
    margin: 0;
    padding: 0;
    height: auto;
}

body  {
    font-family: Tahoma, Geneva, Verdana, sans-serif;
    margin: 0; 
    padding: 0;
    color: black;
    background-image: url('../Travel/bg.gif');
    background-repeat:repeat-x;
    background-position: center top;
    background-color: green;
    font-size: 71%;    
}

#s4-ribbonrow,#s4-workspace { max-width:1024px; margin:0 auto; padding:0px; background-color:silver; }

.s4-notdlg
{
 max-width:1024px; margin:0 auto; padding:0px;  height:40px;
}

上一篇:Xamarin+Prism小试牛刀:定制跨平台Outlook邮箱应用


下一篇:.NET 互联网技术简介