SPWeb.CustomizeCss 方法

Customizes the specified style sheet for the website.

命名空间:  Microsoft.SharePoint
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
Public Sub CustomizeCss ( _
    cssFile As String _
)
用法
Dim instance As SPWeb
Dim cssFile As String

instance.CustomizeCss(cssFile)
public void CustomizeCss(
    string cssFile
)

参数

  • cssFile
    类型:System.String

    The file name and extension of the cascading style sheets (CSS) file.

异常

异常 条件
SPException

Customized CSS files are not supported on sites with alternate languages. See the IsMultilingual property.

-or-

cssFile is empty, null , or does not contain the .CSS extension of a CSS file.

备注

When you execute this method to override the specified CSS, such as core.css, a copy of this file that can be found in the \\ProgramFiles\Common Files\Microsoft Shared\web server extensions\14\\Template\Layouts\1033\Stylesfolder is copied to the folder (access this by SharePoint Designer) named _styles on the website.

另请参阅

引用

SPWeb 类

SPWeb 成员

Microsoft.SharePoint 命名空间

IsMultilingual