part3-css分解.pptVIP

  • 5
  • 0
  • 约9.23千字
  • 约 33页
  • 2017-06-13 发布于湖北
  • 举报
3.12 The span and div tags Use span to apply a document style sheet to its content style type = text/css bigred {font-size: 24pt;font-family: Ariel; color: red} /style …. p Now is the span class = bigred best time /span ever! /p 3.12 The span and div tags Another tag that is useful for style specifications: div Used to create document sections (or divisions) for which style can be specified e.g., A section of heading and paragraphs for which you want some particular style Example 3-div.html Class exercises Exercise 5 (pp.127) 2-* Programming the World Wide Web Programming the World Wide Web Part 3 Cascading Style Sheets Content 3.1 Introduction 3.2 Levels of Style Sheets 3.3 Style specification formats 3.4 Selector forms 3.5 Property values forms 3.6-3.12 All kinds of properties 3.1 Introduction CSS provides the means to control and change presentation of HTML documents Style sheets allow you to impose a standard style on a whole document, or even a whole collection of documents Style is specified for a tag by the values of its properties CSS is not technically HTML, but can be embedded in HTML documents 3.2 Levels of Style Sheets There are three levels of style sheets Inline - specified for a specific occurrence of a tag and apply only to that tag – This is fine-grain style, which defeats the purpose of style sheets - uniform style Document-level style sheets - apply to the whole document in which they appear External style sheets - can be applied to any number of documents When more than one style sheet applies to a specific tag in a document, the lowest level style sheet has precedence 3.2 Levels of Style Sheets Inline style sheets appear in the tag itself p style=color:#ff0000inline style sheet/p Document-level style sheets appear in the head of the document style type=text/css p{color:red;font-weight:bold} /style External style sheets are in separate fil

文档评论(0)

1亿VIP精品文档

相关文档