Simple Rounded Corners with Javascript
Nov 19th, 2008 | By admin | Category: JavascriptEveryone knows it is so painful to handle rounded corners with extra divs, slices making alignments harder than ever, using CSS. Now I introduce, no not me actually, Christian Effenberger , a way to do rounded corner effect on images with javascript. It is really easy and fun, so i won’t go on talking, rather, I’m going to explain how to use it.
Visit this page and download “corner.zip”. In the zip file, there are few javascript files that you can have some other effects with, but if you just want rounded corners, copy justcorners.js and reference it inside your head tags.
... <script src="http://www.wowebmaster.com/demo/justcorners.js" type="text/javascript"><!--mce:0--></script> |
Then, add a class into your image tag as it’s done in the following code.
<img class="corners iradius12" src="http://www.wowebmaster.com/demo/corner.jpg" alt="" width="561" height="353" /> |
Corner radius is set by the second class, which is “iradius12″ above. If you want greater radius, use highger values after “iradius”. e.g. iradius15, iradius25, iradius30…
See more examples at: http://www.netzgesta.de/corner/
