jQuery .css border-radius不能与position:absolute一起使用? [英] jQuery .css border-radius does not work with position:absolute?

查看:173
本文介绍了jQuery .css border-radius不能与position:absolute一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一系列图像,可以进行图库类型的显示。我使用jQuery使它们圆形,每个都有一个随机直径。

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.

它完全正常,但我需要正确放置它们。问题是给< div> 包含图像的位置:绝对(或任何类型的位置) )将< div> 转回广场。

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?

我制作了一个小提琴,使代码清晰。

推荐答案

放一个包装< div> 似乎解决了这个问题......

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

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

这篇关于jQuery .css border-radius不能与position:absolute一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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