在左侧重复的纹理,在右侧重复的纹理 [英] A texture that repeats on the left and another that repeats on the right

查看:68
本文介绍了在左侧重复的纹理,在右侧重复的纹理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道该怎么做,但是我想有2个重复的纹理,一个重复到左边,另一个重复到右边.

I don't know how to do this, but I would like to have 2 repeating textures, one that repeats to the left and one to the right.

代替:

#header {
   background-image : Url('My_Two_Textures_Combined.png');
   background-repeat : repeat-x; /*Which repeats my joined textures a long the x axis*/
}

我想要:

#header {
   background-image : Url('My_Left_Texture');
   background-repeat : repeat-x-left; /*Which would ideally repeat my texture to the left on the x axis*/
   background-image : Url('My_Right_Texture');
   background-repeat : repeat-x-Right; /*Which would ideally repeat my texture to the right on the x axis*/
}

我希望有办法做到这一点,因为我认为它在我的网站上看起来不错.我将尝试查看其他方法来执行此操作,例如使用伪命令或其他方法.如果我发现任何东西,我会在这里发布!

I hope there's a way to do this because I think it would look nice on my website. I will try to look at other ways to do this, like with pseudo commands or something. If I find anything I will post it here!

推荐答案

您可以使用css选择器,例如:before:after,并将其中一个背景放置在#header:before {}中,将一个背景放置在#header:after {}中.

You could use css selectors like :before and :after, and place one of your backgrounds in #header:before {} and one in #header:after {}.

这篇关于在左侧重复的纹理,在右侧重复的纹理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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