Sphere.jsを使う
Web creatorsの2009年1月号で紹介されていた、透き通ったボールのようなアイコンを作るライブラリshpere.jsを使ってみる。
ライブラリをダウンロードし、次のHTMLを準備する。
<head> <script type="text/javascript" src="/home/hoge/js/sphere/cvi_sphere_lib.js"></script> <script type="text/javascript" src="/home/hoge/js/sphere/sphere.js"></script> </head> <body> <img class="sphere icolor0000ff igradient00ffff ialpha75" src="/home/hoge/pictures/sakura2008.jpg" height="512" border="0" alt=""/> </body>
これをブラウザで読み込むと、
図1:元の画像
図2:作成された画像
のように表示できる。