固定标题-Squarespace-盐水模板

时间:2019-03-12 19:39:25

标签: css header sticky squarespace

我的网站存在一些问题。

当前,我有一个非常酷的固定标头,向上滚动时,它的移动幅度很小。底部居中的导航栏也随页面的其余部分向上滚动,并隐藏在网站品牌(主标题)下。如何保留网站品牌,以底部为中心的导航,并确保所有这些元素保持不变?我目前正在使用的代码以及参考照片可在下面找到。

清理标题示例:
Clean header example

消失的标题导航示例:
Disappearing header nav example

@media screen and (min-width: 640px) {
.websiteFrame, .Mobile {
  position: fixed;
  z-index: 1010;
  background-color: rgb(0, 0, 0);
} }

@media screen and (min-width: 640px) {
#websiteFrameTop {
  top: 0;
  left: 0;
  width: 100%;
  height: 15px;
} }

@media screen and (min-width: 640px) {
.Header--top, .Mobile {
  width: 100%;
  position: fixed;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  border-bottom: 1px solid #f2f2f2;
  z-index: 1009;
} }

@media screen and (min-width: 640px) {
.Header--bottom, .Mobile {
  width: 100%;
  position: fixed;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1008;
} }

0 个答案:

没有答案