Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 固定导航与图像重复-x_Html_Css_Background Image_Css Position_Repeat - Fatal编程技术网

Html 固定导航与图像重复-x

Html 固定导航与图像重复-x,html,css,background-image,css-position,repeat,Html,Css,Background Image,Css Position,Repeat,我正在努力使我的导航栏固定,同时让重复是“重复-x”。下面是进一步使用css时的结果图像。 下面是toplinks(导航栏)中包含的css代码 导航栏不是我做的,但我添加了“位置”和“z索引”。我想用repeat-x在页面上显示条 如果可以的话,你能帮我吗 尝试将包含元素设置为位置:相对;然后设置为左:0 它看起来不一定像一个repeat-x问题,更多的是您的元素被推到了另一个位置 编辑: 你能发布你的html吗?一个JSFIDLE或一个指向该网站的链接会很有用。添加了一个指向该网站的链接。如

我正在努力使我的导航栏固定,同时让重复是“重复-x”。下面是进一步使用css时的结果图像。

下面是toplinks(导航栏)中包含的css代码

导航栏不是我做的,但我添加了“位置”和“z索引”。我想用repeat-x在页面上显示条

如果可以的话,你能帮我吗


尝试将包含元素设置为位置:相对;然后设置为左:0

它看起来不一定像一个repeat-x问题,更多的是您的元素被推到了另一个位置

编辑:


你能发布你的html吗?一个JSFIDLE或一个指向该网站的链接会很有用。添加了一个指向该网站的链接。如果我这样做,当我滚动时,它将不会停留在屏幕顶部。我基本上是想找出一种方法,使它在滚动时保持在屏幕顶部,但仍然能够让背景图像重复-x。你误解了。保持位置:固定;元素,但将容器设置为position:relative;-这就是固定的那个元素。
.toplinks {
    /*float: right;*/
    {vb:stylevar right}:{vb:math {vb:stylevar padding}*2};
    color:{vb:stylevar toplinks_link_color};
    font: {vb:stylevar header_font};
    text-align:{vb:stylevar right};
    background:{vb:stylevar toplinks_background};
    padding-top: 10px;
    height: 35px;
    background-attachment: scroll;
    background-image: url({vb:stylevar imgdir_misc}/top-links-bg.jpg);
    background-repeat: repeat-x;
    background-position: left top;
    background-color: #633f24;
    z-index: 20;
    position: fixed;
}
.toplinks {
color: #eee2d6;
font: normal normal normal 11px Arial,Tahoma,Calibri,Verdana,Geneva,sans-serif;
text-align: right;
background: none;
padding-top: 10px;
height: 35px;
background-attachment: scroll;
background-image: url(http://a-trix.net/forum/images/primus/sandy/misc/top-links-bg.jpg);
background-position: left top;
background-repeat: repeat-x;
background-color: #633f24;
position: fixed;
width: 100%;
z-index: 1000;
}