self_example/java_web/CSS/html/02-导入方式.html

31 lines
591 B
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>02-导入方式</title>
<!--内部方式-->
<style>
span{
color: red;
}
</style>
<!--外部样式引入对应的css文件 rel告诉引入的是一个css文件将来还可以引入其他的文件-->
<link href="../css/demo.css" rel="stylesheet">
</head>
<body>
<!--内联样式,他让html代码和css偶合在一起不太好-->
<div style="color: red">hello,css</div>
<span>hello css</span>
<br>
<p>hello css</p>
</body>
</html>