4、網頁製作Dreamweaver(樣式表CSS),dreamweavercss
樣式表style
寫在body裡面/head裡面都可以
1、head裡面的寫法ex.(樣式表選取器)
<head>
<style type="text/css">
body(簡單設定)
{
background-color:#CC0;
background-image:url(../../%E5%BE%AE%E4%BF%A1%E4%BA%8C%E7%BB%B4%E7%A0%81.jpg);
background-repeat:no-repeat;
}
table
{
background-image:url(../../360%E6%88%AA%E5%9B%BE20141116110142765.jpg);
background-repeat:repeat;
}
.自訂名字(再到其他的標籤中使用,如<body class=” 自訂名字”>)
{
background-image:url(../../%E5%BE%AE%E4%BF%A1%E4%BA%8C%E7%BB%B4%E7%A0%81.jpg);
background-repeat:no-repeat;
background-size:contain
}
table .自訂名(只能在table的標籤內使用,table和“.自訂名”之間有一個空格)
{
color:#3F0;
}
.自訂名 font(自動尋找在“.自訂名”後存在font標籤的部分並賦給它樣式)
{
font:"華文彩雲";
}
#textfield(在#後加上ID,可以對ID所在的style單獨設定)
{
border:dotted
}
</style>
</head>
2、body中的寫法:
<body class=”自訂名字”>
<table class=”自訂名”>
<tr class=”自訂名”>
<td>
<font>
<input type="text" name="textfield" id="textfield" />
</font>
</td>
</tr>
</table>
</body>
匯入css方法:
1、在html檔案中:<link rel=”stylesheet” href=”xxx.css”>
2、然後再將其他css附加:@import url(“xxx.css”),
選取器優先順序:
ID>class>標籤
連結的style:
a:link 超連結被點前狀態
a:visited 超連結點擊後狀態
a:hover 懸停在超連結時
a:active 點擊超連結時
在定義這些狀態時,有一個順序l v h a
css濾鏡