《CSS3秘笈》备忘录

第一部分

1、  类名称区分大小写:.special和.SPECIAL不一样

2、  :focus 是通过单击或跳格集中在某个地方

3、  ::selection 没有单冒号,被选中的文本【

但是在IE8和Firefox中不支持,

    使用à  ::-moz-selection{}

4、  :not()一个选择器中只能用一个【:not():not()】,不能使用派生选择器【:not(div p)】

5、  ^以什么开头,$以什么结尾,*包含什么

6、  p*  是指p元素内部的元素

第二部分

1、    在IE8及更早之前的版本不支持rgba,因此可以使用:

color:rgb(155,100,50);//支持IE8

color:rgba(155,100,50,.5);

2、    keyword:xx-small(9)/x-small(10)/small(13)/medium()/large(18)/x-large(24)/xx-large(32)

3、    当一个元素的bottom margin和下一个元素的top margin一起用的时候,margin不是相加,而是采用最大的边距

4、    border-radius:如果想要设置成椭圆形的话,就40px/20px

第四部分

响应式:

1、    <title>上方加上<meta name="viewport" content="width=device-width" />

2、    IE8及更早之前的版本不支持媒体查询

因此加上:

<!--[if lte IE 8]>

    <script src="js/respond.min.js" />

<![endif]-->

定位:

1、     不要同时设定float和position:absolute和fixed在一个元素中

原文地址:https://www.cnblogs.com/qzccl/p/5414907.html