• sharepoint 2013 创建母版页


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

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

     或复制以下母版代码

    <%@Master language="C#"%>
    <%@Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>
    <%@Register TagPrefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>
    <%@Register TagPrefix="wssucmui" TagName="MUISelector" Src="~/_controltemplates/15/MUISelector.ascx"%>
    <%@Register TagPrefix="wssuc" TagName="Welcome" Src="~/_controltemplates/15/Welcome.ascx"%>

    <!DOCTYPE HTML>
    <SharePoint:SPHtmlTag runat="server" id="SPHtmlTag" dir="&lt;%$Resources:wss,multipages_direction_dir_value%&gt;">
        <head runat="server">
            <meta http-equiv="X-UA-Compatible" content="IE=10" />
            <meta charset="utf-8" />
            <meta name="GENERATOR" content="Microsoft SharePoint" />
            <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
            <meta http-equiv="Expires" content="0" />
            
            <!-- ===== STARTER: Robots  ======================================================================================================= -->
            <SharePoint:RobotsMetaTag runat="server" />
            
            <!-- ===== STARTER: Favicon / Windows Tile ======================================================================================== -->    
            <SharePoint:SPShortcutIcon runat="server" IconUrl="/_catalogs/masterpage/StarterBranding/favicon.ico" />
            <SharePoint:SPPinnedSiteTile runat="server" TileUrl="/_catalogs/masterpage/StarterBranding/metrotile.png" TileColor="#0072C6" />                
            
            <!-- ===== STARTER: Page Title loaded from page or page layout ==================================================================== -->
            <SharePoint:PageTitle runat="server">
                <asp:ContentPlaceHolder id="PlaceHolderPageTitle" runat="server"><SharePoint:ProjectProperty Property="Title" runat="server" /></asp:ContentPlaceHolder>
            </SharePoint:PageTitle>
            
            <!-- ===== STARTER: SP Scripts and CSS  =========================================================================================== -->
            <SharePoint:StartScript runat="server" />
            <SharePoint:CssLink runat="server" Version="15" />
            <SharePoint:CacheManifestLink runat="server" />
            <SharePoint:PageRenderMode runat="server" RenderModeType="MinimalDownload" />
            <SharePoint:ScriptLink language="javascript" name="core.js" OnDemand="true" runat="server" Localizable="false" />
            <SharePoint:ScriptLink language="javascript" name="menu.js" OnDemand="true" runat="server" Localizable="false" />
            <SharePoint:ScriptLink language="javascript" name="callout.js" OnDemand="true" runat="server" Localizable="false" />
            <SharePoint:ScriptLink language="javascript" name="sharing.js" OnDemand="true" runat="server" Localizable="false" />
            <SharePoint:ScriptLink language="javascript" name="suitelinks.js" OnDemand="true" runat="server" Localizable="false" />
            <SharePoint:CustomJSUrl runat="server" />
            <SharePoint:SoapDiscoveryLink runat="server" />
        
            <!-- ===== STARTER: Additional header placeholder - overridden by asp:content on pages or page layouts  =========================== -->
            <SharePoint:AjaxDelta ID="DeltaPlaceHolderAdditionalPageHead" Container="false" runat="server">
                <asp:ContentPlaceHolder ID="PlaceHolderAdditionalPageHead" runat="server" />
                <SharePoint:DelegateControl runat="server" ControlId="AdditionalPageHead" AllowMultipleControls="true" />
            </SharePoint:AjaxDelta>

            <!-- ===== STARTER: Core SharePoint CSS =========================================================================================== -->
            <SharePoint:CssRegistration Name="Themable/corev15.css" runat="server" />

            <!-- ===== STARTER: Custom CSS  =================================================================================================== -->
            <SharePoint:CssRegistration ID="CssRegistration1" name="/_catalogs/masterpage/StarterBranding/style.css" runat="server" after="SharepointCssFile" />    
        </head>
        
        <body>
            <!-- ===== STARTER: SP IDs / Prefetch SP images / SP Form  =========================================================================== -->
            <SharePoint:SPClientIDGenerator runat="server" ServerControlID="DeltaPlaceHolderMain;DeltaPlaceHolderPageTitleInTitleArea;DeltaPlaceHolderUtilityContent" />
            <SharePoint:ImageLink runat="server" />
            <SharePoint:SharePointForm onsubmit="if (typeof(_spFormOnSubmitWrapper) != 'undefined') {return _spFormOnSubmitWrapper();} else {return true;}" runat="server">
            
            <!-- ===== STARTER: SharePoint Reqs this for adding columns ===================================================== -->
            <script type="text/javascript"var submitHook = function () { return false; }; theForm._spOldSubmit = theForm.submit; theForm.submit = function () { if (!submitHook()) { this._spOldSubmit(); } }; </script>

            <!-- ===== STARTER: Web Part Manager  ============================================================================================= -->
            <SharePoint:AjaxDelta id="DeltaSPWebPartManager" runat="server"><WebPartPages:SPWebPartManager runat="server"/></SharePoint:AjaxDelta>
            
                <!-- ===== STARTER: ScriptManager ===================================================== -->
                <asp:ScriptManager id="ScriptManager" runat="server" EnablePageMethods="false" EnablePartialRendering="true" EnableScriptGlobalization="false" EnableScriptLocalization="true" />
            
                <!-- ===== STARTER: Ribbon Code Starts Here (compressed for code readability) ===================================================== -->
                <div id="suiteBar" class="ms-dialogHidden noindex">
                    <div id="suiteBarLeft"><div class="ms-table ms-fullWidth"><div class="ms-tableRow"><div class="ms-tableCell ms-verticalAlignMiddle">
                        <SharePoint:DelegateControl id="ID_SuiteBarBrandingDelegate" ControlId="SuiteBarBrandingDelegate" runat="server"/></div>
                        <SharePoint:AjaxDelta runat="server" id="DeltaSuiteLinks" BlockElement="true" CssClass="ms-core-deltaSuiteLinks"><div id="suiteLinksBox"><SharePoint:DelegateControl id="ID_SuiteLinksDelegate" ControlId="SuiteLinksDelegate" runat="server" /></div></SharePoint:AjaxDelta></div></div></div>
                    <div id="suiteBarRight">
                        <SharePoint:AjaxDelta runat="server" id="DeltaSuiteBarRight" CssClass="ms-core-deltaSuiteBarRight" BlockElement="true"><div id="welcomeMenuBox"><wssuc:Welcome id="IdWelcome" runat="server" EnableViewState="false" /></div><div id="suiteBarButtons"><span class="ms-siteactions-root" id="siteactiontd"><SharePoint:SiteActions runat="server" accesskey="<%$Resources:wss,tb_SiteActions_AK%>" id="SiteActionsMenuMain"    PrefixHtml="" SuffixHtml="" ImageUrl="/_layouts/15/images/spcommon.png?rev=23" ThemeKey="spcommon" MenuAlignment="Right" MenuNotVisibleHtml="&amp;nbsp;" LargeIconMode="false"><CustomTemplate><SharePoint:FeatureMenuTemplate runat="server" FeatureScope="Site" Location="Microsoft.SharePoint.StandardMenu" GroupId="SiteActions" UseShortId="true"><SharePoint:MenuItemTemplate runat="server"  id="MenuItem_ShareThisSite"  Text="<%$Resources:wss,siteactions_sharethissite%>"  Description="<%$Resources:wss,siteactions_sharethissitedescription%>"  MenuGroupId="100"  Sequence="110"  UseShortId="true"  PermissionsString="ViewPages"  PermissionMode="Any" /><SharePoint:MenuItemTemplate runat="server" id="MenuItem_EditPage"  Text="<%$Resources:wss,siteactions_editpage15%>"  Description="<%$Resources:wss,siteactions_editpagedescriptionv4%>"  ImageUrl="/_layouts/15/images/ActionsEditPage.png?rev=23"  MenuGroupId="200"  Sequence="210"  PermissionsString="EditListItems"  ClientOnClickNavigateUrl="javascript:ChangeLayoutMode(false);" /><SharePoint:MenuItemTemplate runat="server" id="MenuItem_CreatePage"  Text="<%$Resources:wss,siteactions_addpage15%>"  Description="<%$Resources:wss,siteactions_createpagedesc%>"  ImageUrl="/_layouts/15/images/NewContentPageHH.png?rev=23"  MenuGroupId="200"  Sequence="220"  UseShortId="true"  ClientOnClickScriptContainingPrefixedUrl="OpenCreateWebPageDialog('~siteLayouts/createwebpage.aspx')"  PermissionsString="AddListItems, EditListItems"  PermissionMode="All" /><SharePoint:MenuItemTemplate runat="server" id="MenuItem_Create"  Text="<%$Resources:wss,siteactions_addapp15%>"  Description="<%$Resources:wss,siteactions_createdesc%>"  MenuGroupId="200"  Sequence="230"  UseShortId="true"  ClientOnClickScriptContainingPrefixedUrl="GoToPage('~siteLayouts/addanapp.aspx')"  PermissionsString="ManageLists, ManageSubwebs"  PermissionMode="Any" /><SharePoint:MenuItemTemplate runat="server" id="MenuItem_ViewAllSiteContents"  Text="<%$Resources:wss,quiklnch_allcontent_15%>"  Description="<%$Resources:wss,siteactions_allcontentdescription%>"  ImageUrl="/_layouts/15/images/allcontent32.png?rev=23"  MenuGroupId="200"  Sequence="240"  UseShortId="true"  ClientOnClickNavigateUrl="~siteLayouts/viewlsts.aspx"  PermissionsString="ViewFormPages"  PermissionMode="Any" /><SharePoint:MenuItemTemplate runat="server" id="MenuItem_ChangeTheLook"  Text="<%$Resources:wss,siteactions_changethelook15%>"  Description="<%$Resources:wss,siteactions_changethelookdesc15%>"  MenuGroupId="300"  Sequence="310"  UseShortId="true"  ClientOnClickNavigateUrl="~siteLayouts/designgallery.aspx"  PermissionsString="ApplyThemeAndBorder,ApplyStyleSheets,Open,ViewPages,OpenItems,ViewListItems"  PermissionMode="All" /><SharePoint:MenuItemTemplate runat="server" id="MenuItem_Settings"  Text="<%$Resources:wss,siteactions_settings15%>"  Description="<%$Resources:wss,siteactions_sitesettingsdescriptionv4%>"  ImageUrl="/_layouts/15/images/settingsIcon.png?rev=23"  MenuGroupId="300"  Sequence="320"  UseShortId="true"  ClientOnClickScriptContainingPrefixedUrl="GoToPage('~siteLayouts/settings.aspx')"  PermissionsString="EnumeratePermissions,ManageWeb,ManageSubwebs,AddAndCustomizePages,ApplyThemeAndBorder,ManageAlerts,ManageLists,ViewUsageData"  PermissionMode="Any" /><SharePoint:MenuItemTemplate runat="server" id="MenuItem_SwitchToMobileView"  Visible="false"  Text="<%$Resources:wss,siteactions_switchtomobileview%>"  Description="<%$Resources:wss,siteactions_switchtomobileviewdesc%>"  MenuGroupId="300"  Sequence="330"  UseShortId="true"  ClientOnClickScript="var mswlh = window.location.href; if (mswlh.indexOf('?')==-1) { window.location = mswlh + '?mobile=1'; } else { window.location = mswlh + '&mobile=1'; }" /></SharePoint:FeatureMenuTemplate></CustomTemplate></SharePoint:SiteActions></span><span id="ms-help"><SharePoint:ThemedClusteredHoverImage runat="server" ID="TopHelpLink" ThemeKey="spintl" TouchMode="true" TouchModeWidth="30" TouchModeHeight="30" TouchModePaddingTop="7" TouchModePaddingRight="7" TouchModePaddingBottom="7" TouchModePaddingLeft="7" ImageUrl="/_layouts/15/~lcid/images/spintl.png" Width="16" Height="16" OffsetX="19" OffsetY="1" HoverOffsetX="1" HoverOffsetY="1" NavigateUrl="#" onclick="TopHelpButtonClick('HelpHome',event);return false" AlternateText="<%$Resources:wss,multipages_helplink_text%>" AccessKey="<%$Resources:wss,multipages_helplink_accesskey%>" ToolTip="<%$Resources:wss,multipages_helplink_text%>" /></span></div></SharePoint:AjaxDelta></div>
                </div>
                <div id="ms-hcTest"></div>
                <div id="s4-ribbonrow">
                    <div id="globalNavBox" class="noindex">
                        <div id="ribbonBox">
                            <div id="s4-ribboncont">
                                <SharePoint:AjaxDelta id="DeltaSPRibbon" BlockElement="true" runat="server"><SharePoint:DelegateControl runat="server" ID="GlobalDelegate0" ControlId="GlobalSiteLink0" /><SharePoint:SPRibbon runat="server"    PlaceholderElementId="RibbonContainer"    CssFile="" ><SharePoint:SPRibbonPeripheralContent runat="server" CssClass="ms-core-defaultFont ms-dialogHidden" Location="TabRowLeft"></SharePoint:SPRibbonPeripheralContent><SharePoint:SPRibbonPeripheralContent runat="server" Location="TabRowRight" ID="RibbonTabRowRight" CssClass="s4-trc-container s4-notdlg ms-core-defaultFont"><SharePoint:SPSharePromotedActionButton runat="server"/><SharePoint:DelegateControl runat="server" ControlId="PromotedActions" AllowMultipleControls="true" /><SharePoint:SPSyncPromotedActionButton runat="server"/><SharePoint:PageStateActionButton id="PageStateActionButton" runat="server" Visible="false" /><span id="fullscreenmodebox" class="ms-qatbutton"><span id="fullscreenmode"><SharePoint:ThemedClusteredHoverImage runat="server" ID="fullscreenmodeBtn" ThemeKey="spcommon" TouchMode="true" TouchModeWidth="30" TouchModeHeight="30" TouchModePaddingLeft="7" TouchModePaddingTop="7" TouchModePaddingRight="7" TouchModePaddingBottom="7" ImageUrl="/_layouts/15/images/spcommon.png?rev=23" Width="16" Height="16" OffsetX="143" OffsetY="178" HoverOffsetX="125" HoverOffsetY="178" NavigateUrl="#" onclick="SetFullScreenMode(true);PreventDefaultNavigation();return false;" AlternateText="<%$Resources:wss,multipages_fullscreenmodelinkalt_text%>" ToolTip="<%$Resources:wss,multipages_fullscreenmodelinkalt_text%>"/></span><span id="exitfullscreenmode" style="display: none;"><SharePoint:ThemedClusteredHoverImage runat="server" ID="exitfullscreenmodeBtn" ThemeKey="spcommon" TouchMode="true" TouchModeWidth="30" TouchModeHeight="30" TouchModePaddingLeft="7" TouchModePaddingTop="7" TouchModePaddingRight="7" TouchModePaddingBottom="7" ImageUrl="/_layouts/15/images/spcommon.png?rev=23" Width="16" Height="16" OffsetX="107" OffsetY="178" HoverOffsetX="179" HoverOffsetY="96" NavigateUrl="#" onclick="SetFullScreenMode(false);PreventDefaultNavigation();return false;" AlternateText="<%$Resources:wss,multipages_fullscreenmodelinkalt_text%>" ToolTip="<%$Resources:wss,multipages_fullscreenmodelinkalt_text%>"/></span></span><SharePoint:DeveloperDashboard runat="server" /><SharePoint:DeveloperDashboardLauncher ID="DeveloperDashboardLauncher" ThemeKey="spcommon" TouchMode="true" TouchModeWidth="30" TouchModeHeight="30" TouchModePaddingLeft="7" TouchModePaddingTop="7" TouchModePaddingRight="7" TouchModePaddingBottom="7" NavigateUrl="javascript:return false" OnClick="ToggleDeveloperDashboard(window.g_ddHostBase);return false" OuterCssClass="ms-dd-button ms-qatbutton" runat="server" ImageUrl="/_layouts/15/images/spcommon.png?rev=23" AlternateText="<%$Resources:wss,multipages_launchdevdashalt_text%>" ToolTip="<%$Resources:wss,multipages_launchdevdashalt_text%>" OffsetX="145" OffsetY="196" HoverOffsetX="163" HoverOffsetY="196" Height="16" Width="16" /></SharePoint:SPRibbonPeripheralContent></SharePoint:SPRibbon></SharePoint:AjaxDelta></div>
                            <SharePoint:AjaxDelta id="DeltaSPNavigation" runat="server"><asp:ContentPlaceHolder ID="SPNavigation" runat="server"><SharePoint:DelegateControl runat="server" ControlId="PublishingConsole" Id="PublishingConsoleDelegate" /></asp:ContentPlaceHolder></SharePoint:AjaxDelta>
                        </div>
                        <SharePoint:AjaxDelta id="DeltaWebPartAdderUpdatePanelContainer" BlockElement="true" CssClass="ms-core-webpartadder" runat="server"><div id="WebPartAdderUpdatePanelContainer"><asp:UpdatePanel ID="WebPartAdderUpdatePanel" UpdateMode="Conditional" ChildrenAsTriggers="false" runat="server"><ContentTemplate><WebPartPages:WebPartAdder ID="WebPartAdder" runat="server" /></ContentTemplate><Triggers><asp:PostBackTrigger ControlID="WebPartAdder" /></Triggers></asp:UpdatePanel></div></SharePoint:AjaxDelta>
                    </div>
                </div>
                <!-- ===== STARTER: Ribbon Code Ends Here  ======================================================================================== -->
                
                <!-- ===== STARTER: Main Scrolling Body Starts Here =============================================================================== -->
                <div id="s4-workspace">
                    <div id="s4-bodyContainer">
                    
                        <!-- ===== STARTER: SharePoint looks for this div ID s4-titlerow for the "Focus on Content" Button ======================== -->
                        <div id="s4-titlerow">
                        
                            <!-- ===== STARTER: Site Logo with link to root ======================================================================= -->
                            <div class="ms-dialogHidden">
                                <SharePoint:AjaxDelta ID="Custom_Logo" BlockElement="true" runat="server">
                                    <SharePoint:SPLinkButton runat="server" NavigateUrl="~sitecollection/">
                                        <SharePoint:SiteLogoImage ID="x63829de2201a4365a3904788f682d0a3" LogoImageUrl="/_catalogs/masterpage/StarterBranding/logo.png" AlternateText="Back to Home" runat="server" />
                                    </SharePoint:SPLinkButton>
                                </SharePoint:AjaxDelta>                
                            </div>
                            
                            <!-- ===== STARTER: Global navigation ================================================================================= -->
                            <div class="ms-dialogHidden">
                                <SharePoint:AjaxDelta ID="DeltaTopNavigation" BlockElement="true" CssClass="ms-displayInline ms-core-navigation ms-dialogHidden" runat="server">
                                    <SharePoint:DelegateControl runat="server" ControlId="TopNavigationDataSource" Id="topNavigationDelegate">
                                        <Template_Controls><asp:SiteMapDataSource ShowStartingNode="False" SiteMapProvider="SPNavigationProvider" id="topSiteMap" runat="server" StartingNodeUrl="sid:1002"/></Template_Controls>
                                    </SharePoint:DelegateControl>
                                
                                    <SharePoint:AspMenu ID="TopNavigationMenu" Runat="server" EnableViewState="false" DataSourceID="topSiteMap" AccessKey="<%$Resources:wss,navigation_accesskey%>" UseSimpleRendering="true" UseSeparateCss="false" Orientation="Horizontal" StaticDisplayLevels="2" AdjustForShowStartingNode="true" MaximumDynamicDisplayLevels="2" SkipLinkText="" />
                                </SharePoint:AjaxDelta>
                            </div>
                            
                            <!-- ===== STARTER: Search Control ==================================================================================== -->
                            <div class="ms-dialogHidden">
                                <SharePoint:AjaxDelta ID="DeltaSearch" BlockElement="true" runat="server">
                                    <asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server">
                                        <SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox" />
                                    </asp:ContentPlaceHolder>
                                </SharePoint:AjaxDelta>    
                            </div>
                            
                            <!-- ===== STARTER: Breadcrumbs ======================================================================================= -->
                            <div class="ms-dialogHidden">
                                <h1 id="pageTitle" class="ms-core-pageTitle">
                                    <!-- ===== STARTER: SP Reqs DeltaPlaceHolderPageTitleInTitleArea and PlaceHolderPageTitleInTitleArea for adding Apps in Site Content =================== -->
                                    <SharePoint:AjaxDelta id="DeltaPlaceHolderPageTitleInTitleArea" runat="server">
                                        <asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server">
                                            <SharePoint:SPTitleBreadcrumb runat="server" RenderCurrentNodeAsLink="true" SiteMapProvider="SPContentMapProvider" CentralAdminSiteMapProvider="SPXmlAdminContentMapProvider">
                                                <PATHSEPARATORTEMPLATE>
                                                    <SharePoint:ClusteredDirectionalSeparatorArrow runat="server" />
                                                </PATHSEPARATORTEMPLATE>
                                            </SharePoint:SPTitleBreadcrumb>
                                        </asp:ContentPlaceHolder>
                                    </SharePoint:AjaxDelta>

                                    <SharePoint:AjaxDelta BlockElement="true" id="DeltaPlaceHolderPageDescription" CssClass="ms-displayInlineBlock ms-normalWrap" runat="server">
                                        <a href="javascript:;" id="ms-pageDescriptionDiv" style="display:none;">
                                            <span id="ms-pageDescriptionImage">&#160;</span>
                                        </a>
                                        <span class="ms-accessible" id="ms-pageDescription">
                                            <asp:ContentPlaceHolder id="PlaceHolderPageDescription" runat="server" />
                                        </span>
                                        <SharePoint:ScriptBlock runat="server">
                                            _spBodyOnLoadFunctionNames.push("setupPageDescriptionCallout");
                                        </SharePoint:ScriptBlock>
                                    </SharePoint:AjaxDelta>                        

                                </h1>
                            </div>
                        </div>
                        
                    <!-- ===== STARTER: Body Area (includes left nav and body) ==================================================================== -->
                        
                        <!-- ===== STARTER: Current navigation ==================================================================================== -->
                        <div id="sideNavBox" class="ms-dialogHidden ms-forceWrap ms-noList">
                        
                            <!-- ===== STARTER: SP Reqs PlaceHolderLeftNavBar for adding Apps in Site Content =================== -->
                            <SharePoint:AjaxDelta ID="DeltaPlaceHolderLeftNavBar" BlockElement="true" CssClass="ms-core-navigation" runat="server">
                                <asp:ContentPlaceHolder ID="PlaceHolderLeftNavBar" runat="server">
                                    <asp:ContentPlaceHolder ID="PlaceHolderLeftNavBarTop" runat="server" />
                                    <asp:ContentPlaceHolder ID="PlaceHolderQuickLaunchTop" runat="server" />
                                    <asp:ContentPlaceHolder ID="PlaceHolderLeftNavBarDataSource" runat="server" />
                                    <asp:ContentPlaceHolder ID="PlaceHolderCalendarNavigator" runat="server" />
                                    <asp:ContentPlaceHolder ID="PlaceHolderLeftActions" runat="server" />
                                    
                                    <div class="ms-core-sideNavBox-removeLeftMargin">
                                        <SharePoint:SPNavigationManager id="QuickLaunchNavigationManager" runat="server" QuickLaunchControlId="V4QuickLaunchMenu" ContainedControl="QuickLaunch" EnableViewState="false">
                                            <!-- ===== STARTER: Current navigation Data Provider ==================================================================================== -->
                                            <SharePoint:DelegateControl runat="server" ControlId="QuickLaunchDataSource">
                                            
                                                <Template_Controls><asp:SiteMapDataSource SiteMapProvider="SPNavigationProvider" ShowStartingNode="False" id="QuickLaunchSiteMap" StartingNodeUrl="sid:1025" runat="server" /></Template_Controls>
                                            </SharePoint:DelegateControl>
                                            
                                            <!-- ===== STARTER: Current navigation menu ==================================================================================== -->
                                            <SharePoint:AspMenu id="V4QuickLaunchMenu" runat="server" EnableViewState="false" DataSourceId="QuickLaunchSiteMap" UseSimpleRendering="true" Orientation="Vertical" StaticDisplayLevels="3" AdjustForShowStartingNode="true" MaximumDynamicDisplayLevels="0" SkipLinkText="" />
                                        </SharePoint:SPNavigationManager>
                                        
                                        <!-- ===== STARTER: Tree view ==================================================================================== -->
                                        <SharePoint:SPNavigationManager id="TreeViewNavigationManagerV4" runat="server" ContainedControl="TreeView" CssClass="ms-tv-box">
                                            <SharePoint:DelegateControl runat="server" ControlId="TreeViewAndDataSource">
                                                <Template_Controls>
                                                <SharePoint:SPHierarchyDataSourceControl runat="server" id="TreeViewDataSourceV4" RootContextObject="Web" IncludeDiscussionFolders="true"/>
                                                <SharePoint:SPRememberScroll runat="server" id="TreeViewRememberScrollV4" onscroll="javascript:_spRecordScrollPositions(this);" style="overflow: auto;">
                                                    <SharePoint:SPTreeView id="WebTreeViewV4" runat="server" ShowLines="false" DataSourceId="TreeViewDataSourceV4" ExpandDepth="0" SelectedNodeStyle-CssClass="ms-tv-selected" NodeStyle-CssClass="ms-tv-item" SkipLinkText="" NodeIndent="12" 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>
    View Code

    2.用SharePoint 2013 Designer 打开一个站点, 确保本站点已经启用了(publish Site feature). 通过 “Blank Master Page” 菜单创建一个新的Mdemo.master 母版页, 如下图:


    3.复制代码 并 黏贴到新创建的母版页.  为了直接看到母版页的效果, 可以考虑设置页面的背景色, 内容区域的宽度.

    我们需要添加自己的样式表, 我们不建议嵌入式的CSS样式表, 所以我们创建一个单独的CSS文件, 这里我们用SharePoint 2013自带的Style Library 存储我们自己的样式表.

    在SharePoint designer的Navigation 上找到All files -> Style Library -> New Folder. 如下图

    我们已经创建了一个Landor 文件夹, 并创建了一个Css 样式文件.  然后通过Manage Style-> Attach Style sheet, 在弹出的对话框中定位到刚才创建的样式表, 把新创建的CSS样式表添加到Mdemo.master 页面.


    二、布局页面

    1.变背景色, 并设置页面内容的宽度.添加如下CSS样式

    往style.css中添加以下样式

    body  {
        font-family
    : Tahoma, Geneva, Verdana, sans-serif;
        margin
    : 0; 
        padding
    : 0;
        color
    : black;
        background-image
    : url('bg.gif');
        background-repeat
    :repeat-x;
        background-position
    : top center;
        background-color
    : green;
        font-size
    : 71%;    
    }
    #s4-ribbonrow,#s4-workspace 
    { max-width:1024px; margin:0 auto; padding:0px; background-color:silver; }

    2.添加新的站点Logo, 修改一下代码

    <!-- ===== STARTER: Site Logo with link to root ======================================================================= -->
                            <div class="ms-dialogHidden">
                                <SharePoint:AjaxDelta ID="Custom_Logo" BlockElement="true" runat="server">
                                    <SharePoint:SPLinkButton runat="server" NavigateUrl="~sitecollection/">
                                        <SharePoint:SiteLogoImage ID="x63829de2201a4365a3904788f682d0a3" LogoImageUrl="/Style%20Library/Landor/NsdBG.jpg" AlternateText="Back to Home" runat="server" />
                                    </SharePoint:SPLinkButton>    
                                </SharePoint:AjaxDelta>            </div>

    3.修改导航条位置, 定位到一下代码, 把它剪贴并放到你想要放置的位置:

    <!-- ===== STARTER: Global navigation ================================================================================= -->
                            <div class="ms-dialogHidden">
                                <SharePoint:AjaxDelta ID="DeltaTopNavigation" BlockElement="true" CssClass="ms-displayInline ms-core-navigation ms-dialogHidden" runat="server">
                                    <SharePoint:DelegateControl runat="server" ControlId="TopNavigationDataSource" Id="topNavigationDelegate">
                                        <Template_Controls><asp:SiteMapDataSource ShowStartingNode="False" SiteMapProvider="SPNavigationProvider" id="topSiteMap" runat="server" StartingNodeUrl="sid:1002"/></Template_Controls>
                                    </SharePoint:DelegateControl>
                                
                                    <SharePoint:AspMenu ID="TopNavigationMenu" Runat="server" EnableViewState="false" DataSourceID="topSiteMap" AccessKey="<%$Resources:wss,navigation_accesskey%>" UseSimpleRendering="true" UseSeparateCss="false" Orientation="Horizontal" StaticDisplayLevels="2" AdjustForShowStartingNode="true" MaximumDynamicDisplayLevels="2" SkipLinkText="" />
                                </SharePoint:AjaxDelta>
                            </div>
                            

    4.添加搜索框

    <!-- ===== STARTER: Search Control ==================================================================================== -->
                            <div class="ms-dialogHidden" align="right">
                                <SharePoint:AjaxDelta ID="DeltaSearch" BlockElement="true" runat="server">
                                    <asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server">
                                        <SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox" />
                                    </asp:ContentPlaceHolder>
                                </SharePoint:AjaxDelta>    
                            </div>

    效果图:

     

    下面是详细的master code

    <%@Master language="C#"%>
    <%@Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>
    <%@Register TagPrefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>
    <%@Register TagPrefix="wssucmui" TagName="MUISelector" Src="~/_controltemplates/15/MUISelector.ascx"%>
    <%@Register TagPrefix="wssuc" TagName="Welcome" Src="~/_controltemplates/15/Welcome.ascx"%>

    <!DOCTYPE HTML>
    <SharePoint:SPHtmlTag runat="server" id="SPHtmlTag" dir="&lt;%$Resources:wss,multipages_direction_dir_value%&gt;">
        <head runat="server">
            <meta http-equiv="X-UA-Compatible" content="IE=10" />
            <meta charset="utf-8" />
            <meta name="GENERATOR" content="Microsoft SharePoint" />
            <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
            <meta http-equiv="Expires" content="0" />
            
            <!-- ===== STARTER: Robots  ======================================================================================================= -->
            <SharePoint:RobotsMetaTag runat="server" />
            
            <!-- ===== STARTER: Favicon / Windows Tile ======================================================================================== -->    
            <SharePoint:SPShortcutIcon runat="server" IconUrl="/_catalogs/masterpage/StarterBranding/favicon.ico" />
            <SharePoint:SPPinnedSiteTile runat="server" TileUrl="/_catalogs/masterpage/StarterBranding/metrotile.png" TileColor="#0072C6" />                
            
            <!-- ===== STARTER: Page Title loaded from page or page layout ==================================================================== -->
            <SharePoint:PageTitle runat="server">
                <asp:ContentPlaceHolder id="PlaceHolderPageTitle" runat="server"><SharePoint:ProjectProperty Property="Title" runat="server" /></asp:ContentPlaceHolder>
            </SharePoint:PageTitle>
            
            <!-- ===== STARTER: SP Scripts and CSS  =========================================================================================== -->
            <SharePoint:StartScript runat="server" />
            <SharePoint:CssLink runat="server" Version="15" />
            <SharePoint:CacheManifestLink runat="server" />
            <SharePoint:PageRenderMode runat="server" RenderModeType="MinimalDownload" />
            <SharePoint:ScriptLink language="javascript" name="core.js" OnDemand="true" runat="server" Localizable="false" />
            <SharePoint:ScriptLink language="javascript" name="menu.js" OnDemand="true" runat="server" Localizable="false" />
            <SharePoint:ScriptLink language="javascript" name="callout.js" OnDemand="true" runat="server" Localizable="false" />
            <SharePoint:ScriptLink language="javascript" name="sharing.js" OnDemand="true" runat="server" Localizable="false" />
            <SharePoint:ScriptLink language="javascript" name="suitelinks.js" OnDemand="true" runat="server" Localizable="false" />
            <SharePoint:CustomJSUrl runat="server" />
            <SharePoint:SoapDiscoveryLink runat="server" />
        
            <!-- ===== STARTER: Additional header placeholder - overridden by asp:content on pages or page layouts  =========================== -->
            <SharePoint:AjaxDelta ID="DeltaPlaceHolderAdditionalPageHead" Container="false" runat="server">
                <asp:ContentPlaceHolder ID="PlaceHolderAdditionalPageHead" runat="server" />
                <SharePoint:DelegateControl runat="server" ControlId="AdditionalPageHead" AllowMultipleControls="true" />
            </SharePoint:AjaxDelta>

            <!-- ===== STARTER: Core SharePoint CSS =========================================================================================== -->
            <SharePoint:CssRegistration Name="Themable/corev15.css" runat="server" />

            <!-- ===== STARTER: Custom CSS  =================================================================================================== -->
            <SharePoint:CssRegistration ID="CssRegistration1" name="/_catalogs/masterpage/StarterBranding/style.css" runat="server" after="SharepointCssFile" />    
            <link rel="stylesheet" type="text/css" href="/Style%20Library/Landor/style.css">
        </head>
        
        <body>
            <!-- ===== STARTER: SP IDs / Prefetch SP images / SP Form  =========================================================================== -->
            <SharePoint:SPClientIDGenerator runat="server" ServerControlID="DeltaPlaceHolderMain;DeltaPlaceHolderPageTitleInTitleArea;DeltaPlaceHolderUtilityContent" />
            <SharePoint:ImageLink runat="server" />
            <SharePoint:SharePointForm onsubmit="if (typeof(_spFormOnSubmitWrapper) != 'undefined') {return _spFormOnSubmitWrapper();} else {return true;}" runat="server">
            
            <!-- ===== STARTER: SharePoint Reqs this for adding columns ===================================================== -->
            <script type="text/javascript"var submitHook = function () { return false; }; theForm._spOldSubmit = theForm.submit; theForm.submit = function () { if (!submitHook()) { this._spOldSubmit(); } }; </script>

            <!-- ===== STARTER: Web Part Manager  ============================================================================================= -->
            <SharePoint:AjaxDelta id="DeltaSPWebPartManager" runat="server"><WebPartPages:SPWebPartManager runat="server"/></SharePoint:AjaxDelta>
            
                <!-- ===== STARTER: ScriptManager ===================================================== -->
                <asp:ScriptManager id="ScriptManager" runat="server" EnablePageMethods="false" EnablePartialRendering="true" EnableScriptGlobalization="false" EnableScriptLocalization="true" />
            
                <!-- ===== STARTER: Ribbon Code Starts Here (compressed for code readability) ===================================================== -->
                <div id="suiteBar" class="ms-dialogHidden noindex">
                    <div id="suiteBarLeft"><div class="ms-table ms-fullWidth"><div class="ms-tableRow"><div class="ms-tableCell ms-verticalAlignMiddle">
                        <SharePoint:DelegateControl id="ID_SuiteBarBrandingDelegate" ControlId="SuiteBarBrandingDelegate" runat="server"/></div>
                        <SharePoint:AjaxDelta runat="server" id="DeltaSuiteLinks" BlockElement="true" CssClass="ms-core-deltaSuiteLinks"><div id="suiteLinksBox"><SharePoint:DelegateControl id="ID_SuiteLinksDelegate" ControlId="SuiteLinksDelegate" runat="server" /></div></SharePoint:AjaxDelta></div></div></div>
                    <div id="suiteBarRight">
                        <SharePoint:AjaxDelta runat="server" id="DeltaSuiteBarRight" CssClass="ms-core-deltaSuiteBarRight" BlockElement="true"><div id="welcomeMenuBox"><wssuc:Welcome id="IdWelcome" runat="server" EnableViewState="false" /></div><div id="suiteBarButtons"><span class="ms-siteactions-root" id="siteactiontd"><SharePoint:SiteActions runat="server" accesskey="<%$Resources:wss,tb_SiteActions_AK%>" id="SiteActionsMenuMain"    PrefixHtml="" SuffixHtml="" ImageUrl="/_layouts/15/images/spcommon.png?rev=23" ThemeKey="spcommon" MenuAlignment="Right" MenuNotVisibleHtml="&amp;nbsp;" LargeIconMode="false"><CustomTemplate><SharePoint:FeatureMenuTemplate runat="server" FeatureScope="Site" Location="Microsoft.SharePoint.StandardMenu" GroupId="SiteActions" UseShortId="true"><SharePoint:MenuItemTemplate runat="server"  id="MenuItem_ShareThisSite"  Text="<%$Resources:wss,siteactions_sharethissite%>"  Description="<%$Resources:wss,siteactions_sharethissitedescription%>"  MenuGroupId="100"  Sequence="110"  UseShortId="true"  PermissionsString="ViewPages"  PermissionMode="Any" /><SharePoint:MenuItemTemplate runat="server" id="MenuItem_EditPage"  Text="<%$Resources:wss,siteactions_editpage15%>"  Description="<%$Resources:wss,siteactions_editpagedescriptionv4%>"  ImageUrl="/_layouts/15/images/ActionsEditPage.png?rev=23"  MenuGroupId="200"  Sequence="210"  PermissionsString="EditListItems"  ClientOnClickNavigateUrl="javascript:ChangeLayoutMode(false);" /><SharePoint:MenuItemTemplate runat="server" id="MenuItem_CreatePage"  Text="<%$Resources:wss,siteactions_addpage15%>"  Description="<%$Resources:wss,siteactions_createpagedesc%>"  ImageUrl="/_layouts/15/images/NewContentPageHH.png?rev=23"  MenuGroupId="200"  Sequence="220"  UseShortId="true"  ClientOnClickScriptContainingPrefixedUrl="OpenCreateWebPageDialog('~siteLayouts/createwebpage.aspx')"  PermissionsString="AddListItems, EditListItems"  PermissionMode="All" /><SharePoint:MenuItemTemplate runat="server" id="MenuItem_Create"  Text="<%$Resources:wss,siteactions_addapp15%>"  Description="<%$Resources:wss,siteactions_createdesc%>"  MenuGroupId="200"  Sequence="230"  UseShortId="true"  ClientOnClickScriptContainingPrefixedUrl="GoToPage('~siteLayouts/addanapp.aspx')"  PermissionsString="ManageLists, ManageSubwebs"  PermissionMode="Any" /><SharePoint:MenuItemTemplate runat="server" id="MenuItem_ViewAllSiteContents"  Text="<%$Resources:wss,quiklnch_allcontent_15%>"  Description="<%$Resources:wss,siteactions_allcontentdescription%>"  ImageUrl="/_layouts/15/images/allcontent32.png?rev=23"  MenuGroupId="200"  Sequence="240"  UseShortId="true"  ClientOnClickNavigateUrl="~siteLayouts/viewlsts.aspx"  PermissionsString="ViewFormPages"  PermissionMode="Any" /><SharePoint:MenuItemTemplate runat="server" id="MenuItem_ChangeTheLook"  Text="<%$Resources:wss,siteactions_changethelook15%>"  Description="<%$Resources:wss,siteactions_changethelookdesc15%>"  MenuGroupId="300"  Sequence="310"  UseShortId="true"  ClientOnClickNavigateUrl="~siteLayouts/designgallery.aspx"  PermissionsString="ApplyThemeAndBorder,ApplyStyleSheets,Open,ViewPages,OpenItems,ViewListItems"  PermissionMode="All" /><SharePoint:MenuItemTemplate runat="server" id="MenuItem_Settings"  Text="<%$Resources:wss,siteactions_settings15%>"  Description="<%$Resources:wss,siteactions_sitesettingsdescriptionv4%>"  ImageUrl="/_layouts/15/images/settingsIcon.png?rev=23"  MenuGroupId="300"  Sequence="320"  UseShortId="true"  ClientOnClickScriptContainingPrefixedUrl="GoToPage('~siteLayouts/settings.aspx')"  PermissionsString="EnumeratePermissions,ManageWeb,ManageSubwebs,AddAndCustomizePages,ApplyThemeAndBorder,ManageAlerts,ManageLists,ViewUsageData"  PermissionMode="Any" /><SharePoint:MenuItemTemplate runat="server" id="MenuItem_SwitchToMobileView"  Visible="false"  Text="<%$Resources:wss,siteactions_switchtomobileview%>"  Description="<%$Resources:wss,siteactions_switchtomobileviewdesc%>"  MenuGroupId="300"  Sequence="330"  UseShortId="true"  ClientOnClickScript="var mswlh = window.location.href; if (mswlh.indexOf('?')==-1) { window.location = mswlh + '?mobile=1'; } else { window.location = mswlh + '&mobile=1'; }" /></SharePoint:FeatureMenuTemplate></CustomTemplate></SharePoint:SiteActions></span><span id="ms-help"><SharePoint:ThemedClusteredHoverImage runat="server" ID="TopHelpLink" ThemeKey="spintl" TouchMode="true" TouchModeWidth="30" TouchModeHeight="30" TouchModePaddingTop="7" TouchModePaddingRight="7" TouchModePaddingBottom="7" TouchModePaddingLeft="7" ImageUrl="/_layouts/15/~lcid/images/spintl.png" Width="16" Height="16" OffsetX="19" OffsetY="1" HoverOffsetX="1" HoverOffsetY="1" NavigateUrl="#" onclick="TopHelpButtonClick('HelpHome',event);return false" AlternateText="<%$Resources:wss,multipages_helplink_text%>" AccessKey="<%$Resources:wss,multipages_helplink_accesskey%>" ToolTip="<%$Resources:wss,multipages_helplink_text%>" /></span></div></SharePoint:AjaxDelta></div>
                </div>
                <div id="ms-hcTest"></div>
                <div id="s4-ribbonrow">
                    <div id="globalNavBox" class="noindex">
                        <div id="ribbonBox">
                            <div id="s4-ribboncont">
                                <SharePoint:AjaxDelta id="DeltaSPRibbon" BlockElement="true" runat="server"><SharePoint:DelegateControl runat="server" ID="GlobalDelegate0" ControlId="GlobalSiteLink0" /><SharePoint:SPRibbon runat="server"    PlaceholderElementId="RibbonContainer"    CssFile="" ><SharePoint:SPRibbonPeripheralContent runat="server" CssClass="ms-core-defaultFont ms-dialogHidden" Location="TabRowLeft"></SharePoint:SPRibbonPeripheralContent><SharePoint:SPRibbonPeripheralContent runat="server" Location="TabRowRight" ID="RibbonTabRowRight" CssClass="s4-trc-container s4-notdlg ms-core-defaultFont"><SharePoint:SPSharePromotedActionButton runat="server"/><SharePoint:DelegateControl runat="server" ControlId="PromotedActions" AllowMultipleControls="true" /><SharePoint:SPSyncPromotedActionButton runat="server"/><SharePoint:PageStateActionButton id="PageStateActionButton" runat="server" Visible="false" /><span id="fullscreenmodebox" class="ms-qatbutton"><span id="fullscreenmode"><SharePoint:ThemedClusteredHoverImage runat="server" ID="fullscreenmodeBtn" ThemeKey="spcommon" TouchMode="true" TouchModeWidth="30" TouchModeHeight="30" TouchModePaddingLeft="7" TouchModePaddingTop="7" TouchModePaddingRight="7" TouchModePaddingBottom="7" ImageUrl="/_layouts/15/images/spcommon.png?rev=23" Width="16" Height="16" OffsetX="143" OffsetY="178" HoverOffsetX="125" HoverOffsetY="178" NavigateUrl="#" onclick="SetFullScreenMode(true);PreventDefaultNavigation();return false;" AlternateText="<%$Resources:wss,multipages_fullscreenmodelinkalt_text%>" ToolTip="<%$Resources:wss,multipages_fullscreenmodelinkalt_text%>"/></span><span id="exitfullscreenmode" style="display: none;"><SharePoint:ThemedClusteredHoverImage runat="server" ID="exitfullscreenmodeBtn" ThemeKey="spcommon" TouchMode="true" TouchModeWidth="30" TouchModeHeight="30" TouchModePaddingLeft="7" TouchModePaddingTop="7" TouchModePaddingRight="7" TouchModePaddingBottom="7" ImageUrl="/_layouts/15/images/spcommon.png?rev=23" Width="16" Height="16" OffsetX="107" OffsetY="178" HoverOffsetX="179" HoverOffsetY="96" NavigateUrl="#" onclick="SetFullScreenMode(false);PreventDefaultNavigation();return false;" AlternateText="<%$Resources:wss,multipages_fullscreenmodelinkalt_text%>" ToolTip="<%$Resources:wss,multipages_fullscreenmodelinkalt_text%>"/></span></span><SharePoint:DeveloperDashboard runat="server" /><SharePoint:DeveloperDashboardLauncher ID="DeveloperDashboardLauncher" ThemeKey="spcommon" TouchMode="true" TouchModeWidth="30" TouchModeHeight="30" TouchModePaddingLeft="7" TouchModePaddingTop="7" TouchModePaddingRight="7" TouchModePaddingBottom="7" NavigateUrl="javascript:return false" OnClick="ToggleDeveloperDashboard(window.g_ddHostBase);return false" OuterCssClass="ms-dd-button ms-qatbutton" runat="server" ImageUrl="/_layouts/15/images/spcommon.png?rev=23" AlternateText="<%$Resources:wss,multipages_launchdevdashalt_text%>" ToolTip="<%$Resources:wss,multipages_launchdevdashalt_text%>" OffsetX="145" OffsetY="196" HoverOffsetX="163" HoverOffsetY="196" Height="16" Width="16" /></SharePoint:SPRibbonPeripheralContent></SharePoint:SPRibbon></SharePoint:AjaxDelta></div>
                            <SharePoint:AjaxDelta id="DeltaSPNavigation" runat="server"><asp:ContentPlaceHolder ID="SPNavigation" runat="server"><SharePoint:DelegateControl runat="server" ControlId="PublishingConsole" Id="PublishingConsoleDelegate" /></asp:ContentPlaceHolder></SharePoint:AjaxDelta>
                        </div>
                        <SharePoint:AjaxDelta id="DeltaWebPartAdderUpdatePanelContainer" BlockElement="true" CssClass="ms-core-webpartadder" runat="server"><div id="WebPartAdderUpdatePanelContainer"><asp:UpdatePanel ID="WebPartAdderUpdatePanel" UpdateMode="Conditional" ChildrenAsTriggers="false" runat="server"><ContentTemplate><WebPartPages:WebPartAdder ID="WebPartAdder" runat="server" /></ContentTemplate><Triggers><asp:PostBackTrigger ControlID="WebPartAdder" /></Triggers></asp:UpdatePanel></div></SharePoint:AjaxDelta>
                    </div>
                </div>
                <!-- ===== STARTER: Ribbon Code Ends Here  ======================================================================================== -->
                
                <!-- ===== STARTER: Main Scrolling Body Starts Here =============================================================================== -->
                <div id="s4-workspace">
                    <div id="s4-bodyContainer">
                    
                        <!-- ===== STARTER: SharePoint looks for this div ID s4-titlerow for the "Focus on Content" Button ======================== -->
                        <div id="s4-titlerow">
                        
                            <!-- ===== STARTER: Site Logo with link to root ======================================================================= -->
                            <div class="ms-dialogHidden">
                                <SharePoint:AjaxDelta ID="Custom_Logo" BlockElement="true" runat="server">
                                    <SharePoint:SPLinkButton runat="server" NavigateUrl="~sitecollection/">
                                        <SharePoint:SiteLogoImage ID="x63829de2201a4365a3904788f682d0a3" LogoImageUrl="/Style%20Library/Landor/NsdBG.jpg" AlternateText="Back to Home" runat="server" />
                                    </SharePoint:SPLinkButton>    
                                </SharePoint:AjaxDelta>                
                                

                            </div>
                            
                            <!-- ===== STARTER: Global navigation ================================================================================= -->
                            <div class="ms-dialogHidden">
                                <SharePoint:AjaxDelta ID="DeltaTopNavigation" BlockElement="true" CssClass="ms-displayInline ms-core-navigation ms-dialogHidden" runat="server">
                                    <SharePoint:DelegateControl runat="server" ControlId="TopNavigationDataSource" Id="topNavigationDelegate">
                                        <Template_Controls><asp:SiteMapDataSource ShowStartingNode="False" SiteMapProvider="SPNavigationProvider" id="topSiteMap" runat="server" StartingNodeUrl="sid:1002"/></Template_Controls>
                                    </SharePoint:DelegateControl>
                                
                                    <SharePoint:AspMenu ID="TopNavigationMenu" Runat="server" EnableViewState="false" DataSourceID="topSiteMap" AccessKey="<%$Resources:wss,navigation_accesskey%>" UseSimpleRendering="true" UseSeparateCss="false" Orientation="Horizontal" StaticDisplayLevels="2" AdjustForShowStartingNode="true" MaximumDynamicDisplayLevels="2" SkipLinkText="" />
                                </SharePoint:AjaxDelta>
                            </div>
                            
                            <!-- ===== STARTER: Search Control ==================================================================================== -->
                            <div class="ms-dialogHidden" align="right">
                                <SharePoint:AjaxDelta ID="DeltaSearch" BlockElement="true" runat="server">
                                    <asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server">
                                        <SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox" />
                                    </asp:ContentPlaceHolder>
                                </SharePoint:AjaxDelta>    
                            </div>
                            
                    
                            
                            

                            
                            <!-- ===== STARTER: Breadcrumbs  test网站集101 hide by landor======================================================================================= -->
                            <!-- <div class="ms-dialogHidden">
                                <h1 id="pageTitle" class="ms-core-pageTitle">
                                    
                                    <SharePoint:AjaxDelta id="DeltaPlaceHolderPageTitleInTitleArea" runat="server">
                                        <asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server">
                                            <SharePoint:SPTitleBreadcrumb runat="server" RenderCurrentNodeAsLink="true" SiteMapProvider="SPContentMapProvider" CentralAdminSiteMapProvider="SPXmlAdminContentMapProvider">
                                                <PATHSEPARATORTEMPLATE>
                                                    <SharePoint:ClusteredDirectionalSeparatorArrow runat="server" />
                                                </PATHSEPARATORTEMPLATE>
                                            </SharePoint:SPTitleBreadcrumb>
                                        </asp:ContentPlaceHolder>
                                    </SharePoint:AjaxDelta>

                                    <SharePoint:AjaxDelta BlockElement="true" id="DeltaPlaceHolderPageDescription" CssClass="ms-displayInlineBlock ms-normalWrap" runat="server">
                                        <a href="javascript:;" id="ms-pageDescriptionDiv" style="display:none;">
                                            <span id="ms-pageDescriptionImage">&#160;</span>
                                        </a>
                                        <span class="ms-accessible" id="ms-pageDescription">
                                            <asp:ContentPlaceHolder id="PlaceHolderPageDescription" runat="server" />
                                        </span>
                                        <SharePoint:ScriptBlock runat="server">
                                            _spBodyOnLoadFunctionNames.push("setupPageDescriptionCallout");
                                        </SharePoint:ScriptBlock>
                                    </SharePoint:AjaxDelta>                        

                                </h1>
                            </div> -->
                        </div>
                        
                    <!-- ===== STARTER: Body Area (includes left nav and body) ==================================================================== -->
                        
                        <!-- ===== STARTER: Current navigation ==================================================================================== -->
                        <div id="sideNavBox" class="ms-dialogHidden ms-forceWrap ms-noList">
                        
                            <!-- ===== STARTER: SP Reqs PlaceHolderLeftNavBar for adding Apps in Site Content =================== -->
                            <SharePoint:AjaxDelta ID="DeltaPlaceHolderLeftNavBar" BlockElement="true" CssClass="ms-core-navigation" runat="server">
                                <asp:ContentPlaceHolder ID="PlaceHolderLeftNavBar" runat="server">
                                    <asp:ContentPlaceHolder ID="PlaceHolderLeftNavBarTop" runat="server" />
                                    <asp:ContentPlaceHolder ID="PlaceHolderQuickLaunchTop" runat="server" />
                                    <asp:ContentPlaceHolder ID="PlaceHolderLeftNavBarDataSource" runat="server" />
                                    <asp:ContentPlaceHolder ID="PlaceHolderCalendarNavigator" runat="server" />
                                    <asp:ContentPlaceHolder ID="PlaceHolderLeftActions" runat="server" />
                                    
                                    <div class="ms-core-sideNavBox-removeLeftMargin">
                                        <SharePoint:SPNavigationManager id="QuickLaunchNavigationManager" runat="server" QuickLaunchControlId="V4QuickLaunchMenu" ContainedControl="QuickLaunch" EnableViewState="false">
                                            <!-- ===== STARTER: Current navigation Data Provider ==================================================================================== -->
                                            <SharePoint:DelegateControl runat="server" ControlId="QuickLaunchDataSource">
                                            
                                            
                                                <Template_Controls>
                                                <asp:SiteMapDataSource SiteMapProvider="SPNavigationProvider" ShowStartingNode="False" id="QuickLaunchSiteMap" StartingNodeUrl="sid:1025" runat="server" />
                                                </Template_Controls>
    </SharePoint:DelegateControl>
                                            
                                            <!-- ===== STARTER: Current navigation menu ==================================================================================== -->
                                            <SharePoint:AspMenu id="V4QuickLaunchMenu" runat="server" EnableViewState="false" DataSourceId="QuickLaunchSiteMap" UseSimpleRendering="true" Orientation="Vertical" StaticDisplayLevels="3" AdjustForShowStartingNode="true" MaximumDynamicDisplayLevels="0" SkipLinkText="" />
                                        </SharePoint:SPNavigationManager>
                                        
                                        <!-- ===== STARTER: Tree view ==================================================================================== -->
                                        <SharePoint:SPNavigationManager id="TreeViewNavigationManagerV4" runat="server" ContainedControl="TreeView" CssClass="ms-tv-box">
                                            <SharePoint:DelegateControl runat="server" ControlId="TreeViewAndDataSource">
                                                <Template_Controls>
                                                <SharePoint:SPHierarchyDataSourceControl runat="server" id="TreeViewDataSourceV4" RootContextObject="Web" IncludeDiscussionFolders="true"/>
                                                <SharePoint:SPRememberScroll runat="server" id="TreeViewRememberScrollV4" onscroll="javascript:_spRecordScrollPositions(this);" style="overflow: auto;">
                                                    <SharePoint:SPTreeView id="WebTreeViewV4" runat="server" ShowLines="false" DataSourceId="TreeViewDataSourceV4" ExpandDepth="0" SelectedNodeStyle-CssClass="ms-tv-selected" NodeStyle-CssClass="ms-tv-item" SkipLinkText="" NodeIndent="12" 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>
    View Code

    CSS样式

    /* 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;
    }
    View Code
  • 相关阅读:
    二分模板
    洛谷P1631序列合并(二分答案经典好题,或优先队列堆+数学优化,或有序表一一顺序比较)
    洛谷P1498南蛮图腾(找规律,输出图形题技巧)
    洛谷P2611信息传递(思维环形题,并查集)
    关于环的问题
    洛谷P1064金明的预算方案(好题难题,依赖的背包dp,或计算拓扑先后顺序+记忆化搜索)
    2018.11.4薛猫杯比赛
    大数加减法模板
    洛谷p1060开心的金明(dp,正向暴力递归+剪枝或记忆化)
    洛谷二分答案问题
  • 原文地址:https://www.cnblogs.com/Snowfun/p/4569450.html
Copyright © 2020-2023  润新知