20191104 前端学习总结

20191104学习总结
(一)place holder 提示文字
imput type=“text” placeholder=“提示文字”

(二)二级导航
(1)定位体系:常规流 浮动 定位
1.定位 position:relative 相对定位是相对自己原来的位置
left:20px; 距离左20px 即向右移动20px。
top:50px; 向下移动50px。
2.非静态定位
position:absolute;
left:0 px;
top:0 px;
相对body html 以包含它的离它最近的非静态定位元素的(0,0)点
子绝父相
3.固定定位
position:fixed
a{
position:fixed;
right:0;
bottom:100px;
}

4.float flexbox absolute fixed 会脱离文档流
相对定位和外边距,不会脱离文档流。
出现元素重叠:用定位

5.Z-index 图层从1开始,要与position一起用
例子: Z-index:1;
position:relative;

猜你喜欢

转载自www.cnblogs.com/Wardenclyffe/p/11909262.html
今日推荐