Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to read ACTUAL CSS rule for border radius

I am wrapping an auto-generated div around an image, and I need to apply some styling from the image to the div.

How can I read/get the CSS rule for border-radius that is affecting the image?

For example, if the CSS is setting the border-radius to 30px, it should return "30px", and if it's 50%, it should return "50%" - I want the actual rule, not just a pixel value

enter image description here

like image 246
Marco Prins Avatar asked Dec 08 '25 21:12

Marco Prins


1 Answers

$el.css('border-radius');

where $el is the jQuery object of the generated div.

http://jsfiddle.net/TrueBlueAussie/qfpuLekt/1/

like image 114
Subhranshu Avatar answered Dec 11 '25 09:12

Subhranshu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!