开发者

jQuery .css border-radius does not work with position:absolute?

开发者 https://www.devze.com 2023-03-28 00:47 出处:网络
I have a series of images that makes a gallery-type of display.I use jQuery to make them round with a random diameter for each.

I have a series of images that makes a gallery-type of display. I use jQuery to make them round with a random diameter for each.

It works perfectly fine, but then I need to place them correctly. The problem is that giving the <div>开发者_高级运维 that contains the image a position:absolute (or any kind of position) turns the <div> back into a square.

Is there a fix? Am I doing something wrong?

I made a Fiddle to make the code clear.


Putting a wrapper <div> around each image, seems to solve it...

http://jsfiddle.net/szGnh/21/

0

精彩评论

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

关注公众号