3、外部樣式 例:style.css body { background-color:#cccccc; }i。個(gè)人html。" />

欧美日韩国产一区二区|qovd片|小明个人发布看看|小浪货你夹真紧水又多|老头把我添高潮了A片故|99热久久精品国产一区二区|久久久春色AV

個(gè)人html


個(gè)人html

文章插圖
1、行內(nèi)樣式(內(nèi)聯(lián)樣式)
例:<body >
2、內(nèi)部樣式
例:<head>
<style type="text/css">
【個(gè)人html】body {
background-color:#cccccc;}</style></head>
3、外部樣式
例:style.css
body { background-color:#cccccc;
}index.html
<head>
<link rel="stylesheet" type="text/css" />
</head> css選擇器
1、標(biāo)簽選擇符(又稱為元素選擇符、類型選擇符)
2、id 及 class 選擇符
3、屬性選擇符 [title] a{color:red;} (為所有的屬性是title的a標(biāo)簽的元素變成紅色)
4、包含選擇符
5、偽類選擇符
a:link {color: #FF0000; text-decoration: none} /* 未訪問的鏈接 */
a:visited {color: #00FF00; text-decoration: none} /* 已訪問的鏈接 */
a:hover {color: #FF00FF; text-decoration: underline} /* 鼠標(biāo)在鏈接上 */
a:active {color: #0000FF; text-decoration: underline} /* 激活鏈接 */
6、優(yōu)先級(jí)依次是:
行內(nèi)樣式表 > 內(nèi)部樣式表 > 外部樣式表
7、選擇符id的定義優(yōu)先于class 的定義
8、通配符 *
9、瀏覽器優(yōu)先執(zhí)先 !important標(biāo)注的語句 。

    相關(guān)經(jīng)驗(yàn)推薦