h1 {color:red; font-size:14px;}
元素选择器h1,h2,h3,h4,h5,h6 {color: green;}
选择器分组li strong {font-style: italic;font-weight: normal;}
//派生选择器#idStr {color:red;}
//id选择器.className {text-align: center}
//类选择器[title=W3School] { border:5px solid blue; }
// 属性选择器<link rel="stylesheet" type="text/css" href="mystyle.css" />
//外部样式css
内部样式url
<style type="text/css"> hr {color: sienna;} p {margin-left: 20px;} body {background-image: url("images/back40.gif");} </style>
内联样式spa
<p style="color: sienna; margin-left: 20px"> This is a paragraph </p>
结合使用时,就近原则!!code
Positioningorm
display继承