sheet1. css HTML与CSS pi color: red; font: 1em Times 1 shee2. css <html> p i color: blue <head> h1 font: italic 2em Times <title>Harry' s ancestors </title> <link rel="stylesheet" href="sheet1.css"type="text/css"media="all"/> <style type="text/css"><! @import url(sheet2. csS); h1color: maroon; y body(background: yellow: 1 </style> </head> body> <h1> Charlus potter s/h1> <p style="color: green; >Rowling,'s Black Family. </p> </body> </html>
HTML与CSS <html> <head> <title>Harry's ancestors</title> <link rel="stylesheet" href="sheet1.css" type="text/css" media="all"/> <style type="text/css"><!-- @import url(sheet2.css); h1 {color: maroon; } body {background: yellow; } --></style> </head> <body> <h1>Charlus Potter</h1> <p style="color: green;">Rowling’s Black Family… </p> </body> </html> sheet1.css p { color: red; font: 1em Times;} shee2.css p { color: blue; } h1 {font: italic 2em Times;}
sheet1. css HTML与CSS pi color: red; font: 1em Times 1 shee2. css <html> p i color: blue <head> h1 font: italic 2em Times <title>Harry' s ancestors </title> <link rel="stylesheet" href="sheet1.css"type="text/css"media="all"/> <style type="text/css"><! @import url(sheet2. csS); C Harrys ancestors- indows Internet Explorer h1color: maroon; y body(background: yellow: 1 文件①)编辑q)查看Q)收藏夹0)工具〔r)帮助p ></style> 4A e Harry'ssncestor </head> Charlus potter <body> <h1> Charlus potter s/h1> Rowling's Black Family Tree mentions a Charlus Potter wh grandchild of Phineas Nigellus Black (BFT). They had one <p style="color: green, ">Rowling' it is doubtful that Charlus is Harry's grandfather because Jd </body> getting on a little when he was bom, which explains the only an-extra-treasure, as often happens, I think. They were old </html> only 57 when she died
HTML与CSS <html> <head> <title>Harry's ancestors</title> <link rel="stylesheet" href="sheet1.css" type="text/css" media="all"/> <style type="text/css"><!-- @import url(sheet2.css); h1 {color: maroon; } body {background: yellow; } --></style> </head> <body> <h1>Charlus Potter</h1> <p style="color: green;">Rowling’s Black Family… </p> </body> </html> sheet1.css p { color: red; font: 1em Times;} shee2.css p { color: blue; } h1 {font: italic 2em Times;}
Media <link rel="stylesheet"href="sheet 1. css"type="text/css"media="all"/> 所有媒体 screen 「屏幕媒体,如桌面计算机监视器 print 打印机 project 投影仪 aural 语言合成器、屏幕阅读器等 handheld手持设备,如个人数字助理或支持Web的手机 tty 固定间距环境,如电传打字机 ty 电视机
Media <link rel="stylesheet" href="sheet1.css" type="text/css" media="all"/> aural 语言合成器、屏幕阅读器等 tv 电视机 handheld 手持设备,如个人数字助理或支持Web的手机 project 投影仪 tty 固定间距环境,如电传打字机 print 打印机 screen 屏幕媒体,如桌面计算机监视器 all 所有媒体
属性值的表示 <type> 值的类型 (X|Y) X或Y (XIIY Ⅹ或Y,或者两者都出现,且X和Y出现的顺序 没有限制 [ expression]组合 前面的值或组合可以重复0次或多次 前面的值或组合可以重复1次或多次 前面的值或组合是可选的 {M,N} 前面的值或组合至少重复M次,至多重复N次
属性值的表示 ? 前面的值或组合是可选的 * 前面的值或组合可以重复 0次或多次 {M, N} 前面的值或组合至少重复 M次,至多重复 N 次 + 前面的值或组合可以重复 1次或多次 [expression] 组合 X 或 Y,或者两者都出现,且 X 和 Y出现的顺序 没有限制 (X || Y) (X | Y) X 或 Y <type> 值的类型
属性值举例 give Il me II liberty give liberty glve me liberty me give give me liberty [II am]? the II walrus I the walrus am walrus the am the I walrus walrus the Koo+ Achoo Koo achoo KooKoo achoo Koo Koo Koo achoo
属性值举例 Koo Kachoo Koo Koo Kachoo Koo Koo Koo Kachoo Koo+ Kachoo I the walrus am walrus the am the I walrus walrus the [I | am]? the || walrus give liberty give me liberty me give give me liberty give || me || liberty