[Sphere.jsライブラリ] 球体内に表示される画像の表示位置を指定する

説明

Sphere.jsライブラリで球体内に表示される画像の表示位置を指定するには、imgタグのスタイルシートクラス名にsphereとishiftを指定します。ishiftの後に1〜100までの値を指定します。

サンプルプログラム

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="ja">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Sample</title>
<link rel="stylesheet" href="css/main.css" type="text/css" media="all">
<script type="text/javascript" src="js/cvi_sphere_lib.js"></script>
<script type="text/javascript" src="js/sphere.js"></script>
</head>
<body>
<h1>画像を立体的な球にする</h1>
<div>
<img src="images/sample.jpg" width="480" height="270" class="sphere ishift80">
</div>
</body>
</html>
サンプルを実行
[戻る]