开发者

How to make a background with 45 degree lines with css?

开发者 https://www.devze.com 2023-04-02 05:59 出处:网络
Using CSS or CSS3, how c开发者_高级运维an i make the folowing background ? If possible, i\'d like ie6,7,8 support. I can use a javascript based tool to simulate CSS3 for old browsers (like css3pie

Using CSS or CSS3, how c开发者_高级运维an i make the folowing background ?

How to make a background with 45 degree lines with css?

If possible, i'd like ie6,7,8 support. I can use a javascript based tool to simulate CSS3 for old browsers (like css3pie).


If possible, i'd like ie6,7,8 support.

Use a background image. Even if you could use pure CSS3 to create such a pattern for a background (I highly doubt that is possible), it's not worth the hassle to use a bunch of JavaScript libraries and such just to get it to work in those versions of IE.


I use this. Then you just do background-image:url(blahblahblah.gif)

Any reason you're still supporting IE6? It would be easy to do without IE6 support. IE really sucks for gradient support, so you'll need to use an image, but here's the CSS anyway.

background-color: #0ae;
background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(.5, rgba(255, 255, 255, .2)), color-stop(.5, transparent), to(transparent));
background-image: -moz-linear-gradient(rgba(255, 255, 255, .2) 50%, transparent 50%, transparent);
background-image: -o-linear-gradient(rgba(255, 255, 255, .2) 50%, transparent 50%, transparent);
background-image: linear-gradient(rgba(255, 255, 255, .2) 50%, transparent 50%, transparent);

I know this probably doesn't match your image. I'm sorry, but your image host is blocked by my work, so you'll have to interpret from here. This will work with webkit browsers and FF3.6, and will fall back to the color specified in background-color for non-compliant browsers.


You have to use a repeating texture square. Find a small ping and use a repeating backround.

0

精彩评论

暂无评论...
验证码 换一张
取 消