0
点赞
收藏
分享

微信扫一扫

CSS基本语法格式

王传学 2022-02-10 阅读 63

格式

选择器{
	属性名1:属性值1;
	属性名2:属性值2;
	属性名3:属性值3;
	......
}

选择器
筛选具有相似特征的元素

div{
    color: green;
}
p{
    color: rebeccapurple;
    font-size: 50px;
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>外部样式</title>
    <link rel="stylesheet" href="./a.css">
</head>
<body>
    <div>hello css</div>
    <p>hi css</p>
</body>
</html>
举报

相关推荐

0 条评论