What is a selector?

Each declaration style css (defined) consists of two parts, the following form:

The selector value pairs {statement} +

{Selector 
    style; 
}

In the previous section {} is the "Selector", "selector" indicates the "style" in the role object {}, i.e. the "style" which elements acting in web pages. Such as the right code editor in Line 7 of the "body" is a selector.

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>选择器</title>
<style type="text/css">
body{
    font-size:12px;
    color:red;    
}
</style>
</head>
<body>
<p> Chinese people </ the p- > 
</ body > 
</ HTML >

 

Guess you like

Origin www.cnblogs.com/iBoundary/p/11425270.html