css元素固定
固定顶部
加入我们将一个头部导航栏固定123456789101112.menu {position: fixed; /* 关键 */top:0; /* 关键 */max-width: 640px;z-index: 999;margin:0 auto;background: #fff;width: 100%;height: 50px;border-bottom:1px solid #eee;box-shadow:0px 3px 6px rgba(0,0,0,0.09)}固定底部
比如我们将footer 固定底部
|
|