欢迎来到DIVCSS5查找CSS资料与学习DIV CSS布局技术!

 

Css3 css 的基础上 ,增加了一些样式,为了满足移动端的需求,弹性盒代替浮动,自适应

       Css2.0 中的所有样式 在css3 中都可用

Css3中的选择器:融合了 jquery中的选择:

 

Rgb : 

R  red  0255

G green  0---255

B  blue 0255

调色板中颜色,都是有 r  g  b 数值不同 配成的相应的颜色

Rgba     alpha 透明度

案列:

<!doctype html>

<html>

<head>

<meta charset="utf-8">

<title>无标题文档</title>

<link href="css/index.css" rel="stylesheet" type="text/css" />

</head>

<body>

<div>

       <div>aaa</div>

       <p>ccccc</p>

</div>

<p>dddd</p>

<div class="demo">eeee</div>

<div class="demo1">eeee</div>

<div class="demo2">eeee</div>

<h1>aaa</h1>

</body>

</html>

Css

@charset "utf-8";

/* CSS Document */

p:first-of-type  /* 同一个父元素下的 首个该元素*/

{

background:#ff0000;

}

p:nth-of-type(2){

background:#00ff00;

}

:root

{

background:#ececec;

}

       

如需转载,请注明文章出处和来源网址:http://www.divcss5.com/html5/h14295.shtml