使标题菜单为固定位置(主题tesseract) [英] make header menu a fixed position(theme tesseract)

查看:64
本文介绍了使标题菜单为固定位置(主题tesseract)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试制作tesseract主题的标题菜单( http://tyler.com/ 固定位置,这样如果向下滚动,就可以从网站上的任何位置访问所有菜单元素。



我已经尝试了几件事情,总是在主题的几个css类中添加 position:fixed; 但没有发生。



如果你能帮我解决这个问题,我会很高兴。
在此先感谢

解决方案

编辑此代码 position:relative to position:fixed

  .home .site-header。 no-header-image {
left:auto;
位置:固定;
top:auto;
}

现在要避免隐藏顶部内容:

  .home .site-content {
padding-top:60px;
}

输出


I am trying to make the header menu ontop of the tesseract theme (http://tyler.com/ ) a fixed position, so that if you scroll down one can access all menu elements from any postion on the site.

I have tried a few things and always added position:fixed; to a few css classes of the theme, but nothing happened.

I would be glad, if you could help me out with this issue. Thanks in advance

解决方案

Edit this code from position: relative to position: fixed

.home .site-header.no-header-image {
  left: auto;
  position: fixed;
  top: auto;
}

Now to avoid the top content getting hidden:

.home .site-content {
  padding-top: 60px;
}

Output

这篇关于使标题菜单为固定位置(主题tesseract)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆