css怎么定义全局样式为蓝色,楷体?

html-css05

css怎么定义全局样式为蓝色,楷体?,第1张

在样式文件或style标签里设置全局样式,具体的写法如下:

<style>

*{

color: blue

font-family: '楷体'

}

</style>

color表示字体颜色, font-family表示字体样式

这相当于5个li标签,每个标签前面对应的颜色不一样而已。

li:nth-of-type(1){border-left: 2px solid bule}

li:nth-of-type(2){border-left: 2px solid xxx}

li:nth-of-type(3){border-left: 2px solid red}

li:nth-of-type(4){border-left: 2px solid red}

li:nth-of-type(5){border-left: 2px solid red}