开发者

CSS background tile beginning from the right edge

开发者 https://www.devze.com 2023-02-19 17:43 出处:网络
Are you aware of any mechanism to specify tiling of a background image so that it starts filling from top right corner, and开发者_如何学C not the default top left?

Are you aware of any mechanism to specify tiling of a background image so that it starts filling from top right corner, and开发者_如何学C not the default top left?

Width of the element in question is not fixed, of course.


Use background-position.

body
{
 background-image:url('http://www.schrijvenvoorinternet.nl/wp-content/banaan1.jpg');
 background-position: top right;   
}

Working example: http://jsfiddle.net/aVKzq/


#mydiv { background-position: right top; }

I am not sure if i understood your question correctly though.

0

精彩评论

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