Javascript Rounded Corners for Images

别来无恙 提交于 2021-01-28 12:09:25

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!