Rounded corners
2006年9月16日星期六
Our rounded corners implementation is based on three different works:
- Nifty Corners at http://pro.html.it/esempio/nifty/
- http://www.acko.net/anti-aliased-nifty-corners
- http://seky.nahory.net/2005/04/rounded-corners/
We
took these, combined them, stripped some functionality (kept antialiasing) and simplified the API. There is one
restriction: only DIVs can be rounded with this implementation, which
suited us fine, and made the code a bit shorter.
Usage
You have to attach a class “rounded” to the divs you want round.
Here’s the Javascript that you have to add to the end of your html page:
<script type=“text/javascript”>Rounded(’rounded’, 6, 6);script>
The first parameter, “rounded” stands for the classname
which is used to mark the divs that we want to make round. The other two
parameters are the radius of the corners, the bigger the number, the
rounder you will get.
标签: Technologies
发表评论
订阅 博文评论 [Atom]
<< 主页