1、position: absolute后的元素,设在body里的属性就不生效了?
可以的!
2、text-align的设置居然可以让子元素位置居中……?
没有,只是被子元素继承了而已。
MDN:These properties apply to any text-like content in the element, not only to actual text. Remember that they are inherited by the element's children, so you might have to explicitly turn them off in the children to avoid surprising results.
3、color属性对子元素无效么。。。不应该啊
4、cursor: crosshair; 设置鼠标为十字状。
5、双层页面:
将两个DIV并列写在html中,然后将上层div设置成绝对定位,可以铺满视口。上层div可以设置内嵌子div, 进行内容部署。