摘要: 父盒子采用相对定位,子盒子绝对定位 css代码如下: .bbb{ position: relative; text-align: center; background-color: #f9f9fb !important; } .bbb img{ position: absolute; top: 0; 阅读全文
posted @ 2021-05-15 13:14 想赚点零花钱 阅读(986) 评论(0) 推荐(0) 编辑
摘要: 前提导航栏已经采用固定定位布局 如: .search-index { display: flex; /* 固定定位跟父级没有关系 它以屏幕为准 */ position: fixed; top: 0; left: 50%; /* 固定的盒子应该有宽度 */ -webkit-transform: tra 阅读全文
posted @ 2021-05-15 13:09 想赚点零花钱 阅读(103) 评论(0) 推荐(0) 编辑