标签云

微信群

扫码加入我们

WeChat QR Code

I am making a seamless CSS pattern on the web.I know this is totally nonsense and non-practical at all.But it is just for the sake of having fun.http://codepen.io/vennsoh/pen/iFKyoI have done creating my first tile.Now I am thinking of a way to repeat it to fill up the whole background.Can I complete this feat by just using HTML and CSS?Or must I use javascript to complete this?-Here are my steps if using javascript, correct me or suggest better ways:Calculate current browser width and height. A single tile is (150x150), I will just need to create as many div(s) to cover the whole screen.-I might want to make things move around, each polygon changes color, etc. It won't be static. I am not looking for a background-image solution.Thanks,Venn.


interesting concept. in a way, you're trying to repeat a div all over the webpage?

2019年06月26日04分18秒

Is there some reason you don't just use a repeating background image? I can't think of a good reason not to do it that way, and you haven't given us any clues as to what you're ultimately trying to accomplish.

2019年06月26日04分18秒

Sometimes people are just weird, there are people out there who create illustrations in MS Paint just for fun. I just want to test things out. (:A seamless background pattern that will fill up the whole screen.

2019年06月26日04分18秒

"fun" no i dont want fun here, I always look for solutions to my problems.

2019年06月26日04分18秒

I certainly do want some level of fun in here. And I'm sure others do too. Otherwise, why would the pile of socks question attract so much attention?

2019年06月26日04分18秒

Thanks! I have learned something (:

2019年06月26日04分18秒

Nice. Better than my approach.

2019年06月26日04分18秒

I think that the problem is the asker wants only to use a single div

2019年06月26日04分18秒

:L yup I realised that after I had answered..:D still searching for a way to do so...

2019年06月26日04分18秒

This is the obvious solution, and might not be what the OP ultimately wanted, but it might be the only feasible way to accomplish that with just CSS. +1

2019年06月26日04分18秒