position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 1;
一开始是定位后,元素就从页面消失了,添加了 层级 之后就可以了。
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 1;
一开始是定位后,元素就从页面消失了,添加了 层级 之后就可以了。
转载于:https://www.cnblogs.com/JaneBlog/p/9210422.html