内部style>id>class>标签
1.内部标签style
<style type="text/css">
span {
color: green;
}
.red {
color: red;
}
#blue {
color: blue;
}
</style>
</head>
<body>
<span id="blue" class="red" style="color:black;">Hello World</span>
2.id
<style type="text/css">
span {
color: green;
}
.red {
color: red;
}
#blue {
color: blue;
}
</style>
</head>
<body>
<span id="blue" class="red">Hello World</span>
3.class
<style type="text/css">
span {
color: green;
}
.red {
color: red;
}
#blue {
color: blue;
}
</style>
</head>
<body>
<span class="red">Hello World</span>
4.head标签style
span {
color: green;
}
.red {
color: red;
}
#blue {
color: blue;
}
</style>
</head>
<body>
<span>Hello World</span>