问题
I need to display images with rounded corner. Long time back I saw a website doing this using a javascript library that overlayed the rounded corner image over the normal image.
Do we have any javascript library (preferably jQuery plugin) to do this directly to img tags rather than usijg image as background for a div?
回答1:
You can apply CSS3 border-radius
to img
elements, but the results are a bit wonky. See for yourself: http://jsbin.com/exiha This explains why the overlay you’re talking about is a necessity.
The jQuery Corner Plugin can be used with images: http://www.malsup.com/jquery/corner/image.html
来源:https://stackoverflow.com/questions/2171519/javascript-rounded-corners-for-images