第十一节 CSS引入的三种方式
<!-- CSS:层叠样式表,有了CSS,HTML中大部分表示样式的标签就废弃不用了,HTML只负责文档的结构和内容,表现形式完全交给CSS,HTML文档变得更加简洁,方便爬虫爬取 -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<!-- CSS引入方法:
1、外联式:通过link引入样式,实际开发中都是用外联式
2、嵌入式:通过style标签引入,在网页上创建嵌入的样式表,一般在网站首页使用,性能优化,加快网页加载速度,放在head中
3、内联式:通过标签的style属性,在标签上直接写样式,不推荐 -->
<link rel="stylesheet" type="text/css" href="main.css">
<style type="text/css">
h1{
font-size: 10px;
color: blue;
}
</style>
</head>
<body>
<h1>这是一个一级标题</h1>
<div>这是一个div标签</div>
<a href="https://www.baidu.com" style="font-size: 20;color: gold;" target="_blank">百度链接</a>
</body>
</html> 相关推荐
jiedinghui 2020-10-25
Ladyseven 2020-10-22
zuncle 2020-09-28
xiaohuli 2020-09-02
葉無聞 2020-09-01
nicepainkiller 2020-08-20
AlisaClass 2020-08-09
myloveqiqi 2020-08-09
buttonChan 2020-08-02
drdrsky 2020-07-29
Ladyseven 2020-07-25
nicepainkiller 2020-07-24
AlisaClass 2020-07-19
hellowzm 2020-07-19
background-color: blue;background-color: yellow;<input type="button" value="变蓝" @click="changeColorT
昔人已老 2020-07-19
骆驼的自白 2020-07-18
lanzhusiyu 2020-07-19
hellowzm 2020-07-19
CSSEIKOCS 2020-07-18