初步认识选择器

2020-07-15  本文已影响0人  Amanda妍

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>初步认识选择器</title>

<style type="text/css">

/*标签名选择器*/

div{

background-color: orange;

}

/*id id选择器*/

#one{

color:red;

}

/*class 类选择器 选择多个标签*/

.c1{

font-size:20px;

font-family: "kaiTi";

}

</style>

</head>

<body>

<h1 class="c1">我的标题</h1>

<p class="c1">我的段落</p>

<div id="one" class="c1">DIV1</div>

<div>DIV2</div>

<div class="c1">DIV3</div>

</body>

</html>

上一篇 下一篇

猜你喜欢

热点阅读