<!-- 优先级也受到书写的顺序影响 -->
<!-- id选择器>类选择器>标签选择器(且不受书写顺序影响) -->
<!-- 加上!important拥有最高优先级 -->
<!-- 先写外部样式 -->
<link rel="stylesheet" href="./外部样式.css">
<!-- 内部样式 -->
<style>
/*h1代表选择器,color代表属性。blueviolet代表值;这是标签选择器,定义了之后,所有同类的元素都会使用该标签样式*/
/*类选择器可以给任意元素添加同一个样式*/
h1{
color: blueviolet;
}
.a{
color: blueviolet;
}
p{
color: blueviolet!important;
}
/* font顺序:字体风格,粗细,字体大小,字体类型 */
p{
font:bold italic 50px '楷书';
background-color: gold;
text-align: center;
height: 200px;
line-height: 200px;
}
/* hover link visted是伪类名 */
/* link表示没有访问的时候的样式 */
/* visted表示访问后的样式 */
/* active表示鼠标点击时的样式 */
/* a链接伪类顺序需要按照一定的顺序,先link,再visited,然后hover,最后active */
a:link{
background-color: darkorange;
}
a:visited{
background-color: deeppink;
}
a:hover{
color: cyan;
}
a:active{
color: dimgray;
}
/* cursor:pointer超链接指针 */
/* cursor:default默认指针 */
/* cursor:wait等待指针 */
/* cursor:help表示帮助的指针 */
/* cursor:text表示文本的指针 */
/* cursor:crosshair一般选择区域时显示的指针 */
</style>