15_CSS類別選取器

15_CSS類別選取器

15_CSS類別選取器

 

css file

.red {
color: red;
}
.green {
color: green;
}
.navy {
color: navy;
}
.blue {
color: blue;
}

 

html file

<html>
<head>
<title>網頁標題</title>
<linkrel="stylesheet"type="text/css"href="01.css">
</head>
<body>
You ever have that feeling where you're not sure if
you're awake or still dreaming?
<divclass="red">Free your mind.</div>
<spanclass="green">Believe the unbelievable.</span>
<blockquoteclass="navy">There is no spoon.</blockquote>
<pclass="blue">Because I choose to.</p>
</body>
</html>

 

 

 


發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *