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 > 类 > 元素