画像をズームする
画像のズームにはFullsizeというライブラリを使用すると簡単。
画像は実画像とサムネールの2つを用意する。
<html> <head> <link rel="stylesheet" href="css/fullsize.css" type="text/css" media="all" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script type="text/javascript" src="js/jquery.fullsize.js"></script> <script type="text/javascript"> $(function(){ $("#myPhoto img").fullsize(); }) </script> <style type="text/css"> #myPhoto { width : 400px; } a { text-decoration : none; border-bottom:1px dotted blue; } </style> </head> <body> <div id="myPhoto"> <img src="thumb/1.jpg" longdesc="images/1.jpg" alt="" width="192" height="108" /> <img src="thumb/2.jpg" longdesc="images/2.jpg" alt="" width="192" height="108" /> <img src="thumb/3.jpg" longdesc="images/3.jpg" alt="" width="192" height="108" /> <img src="thumb/4.jpg" longdesc="images/4.jpg" alt="" width="192" height="108" /> </div> </body> </html>