css語法
<style>
選擇符1{ 屬性: 值 ; 屬性: 值 ; ….. ;}
</style>
舉個例子,對所有a標籤進行css處理
<style>
a {text-decoration: none}
a:visited{color: #1e6b8b}
a:hover{
color: crimson;
font-style: italic;
font-size: 26px;
text-decoration: none;
cursor: help;
}
</style>
選擇器的優先級
css的基本選擇器有
1.id選擇器——#id值{}
2.元素選擇器——標籤名稱{}
3.類選擇器——.類名{}
優先級別:
id > 類 > 元素