Using Style Sheets(CSS)_KompoZer user guide教程-查字典教程网
Using Style Sheets(CSS)
Using Style Sheets(CSS)
发布时间:2015-03-10 来源:查字典编辑
摘要:

Using Style Sheets forYour Web PagesUsing Cascade Style SheetsCascade Style Sheets(CSS) can be used to style an HTML document inthree ways:

Using inline styles. Using internal style sheet. Using external style sheets.KompoZer has an inbuilt style sheet editor calledCaScadeS. CaScadeS can be used to produce either aninternal style sheet or an external one. As opposed to inline styles,internal or external style sheets help to keep the content and styleinformation separate.

To style the html document you are editing, CaScadeS can be startedby clicking on Tools and choosing CSS Editor. CaScadeS allows twomodes of style sheet editing:

Beginner Mode: This mode allows to create rules associated to class selectors or type element selectors. Expert Mode: This mode allows to create rules without any restriction.In case there is no style sheet, a new style sheet will beautomatically created.

[ Return to beginning ofsection ]

Creating StyleSheets with KompoZerUsing CaScadeS, one can create either internal style sheets orexternal style sheets. To create an internal style sheet:

Click on the Style elt. button (Optional) Fill in Media list and Title information for the style sheet. Click on Create Stylesheet.To create an external stylesheet:

Click on the Link elt. button Fill in the URL of the stylesheet in the right pane. A new file will be created on the local filesystem, if it doesnot already exist. (Optional) Fill in Media list and Title informationfor the style sheet. Check the "check to create alternate stylesheet" if this is an alternate one.Tip: Always save the html document beforeattaching local style sheet. Also, save document immediately before closingthe CSS editor.

Tip: Use Refresh button in the left pane, ifstylesheet is not immediately downloaded.

[ Return to beginning ofsection ]

Creating Rules forStylesheetsAfter creating one or more stylesheets for the html document, rulescan be created for each stylesheet individually. To use a particularstylesheet for creating or modifying rules, highlight the stylesheetin the left pane by clicking with left mouse button. The right panewill show the detials of the stylesheet in the General Tab. To createnew rules:

Click on the Rule button in the left pane. Right pane shows options as to what kind of rule to create. Choose one of: named style (enter class name below) style applied to all elements of type (enter type below) style applied to all elements matching the following selector Fill in the name of the rule. Click on Create Style Rule button.Rules can be defined using the styling tabs (Text, Background,Border, Box and Aural) in the right pane. To see all the definitionsof a style rule, highlight the rule in the left pane and click on"General" tab in the right pane. The "General" tab shows alldefinitions currently applied to the rule.

[ Return to beginning ofsection ]

[

相关阅读
推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
  • 大家都在看
  • 小编推荐
  • 猜你喜欢
  • 最新KompoZer user guide学习
    热门KompoZer user guide学习
    编程开发基础子分类