esprits top Esprit's Style

    -    エンジニアの足つぼ    -

写真拡大表示 Hoverbox

〆 写真を拡大表示します。

もっとおしゃれなのはJavascriptを参照のこと
OperaもIEもFirefoxもうまく表示されます

1.HoverBoxを使ってみよう!

オリジナルはこちら

 hoverbox
 File  Edit  Tool  Help
@hoverbox.css
.hoverbox
{
	cursor: default;
	list-style: none;
}

.hoverbox a
{
	cursor: default;
}

.hoverbox a .preview
{
	display: none;
}

.hoverbox a:hover .preview
{
	display: block;
	position: absolute;
	top: -33px;
	left: -45px;
	z-index: 1;
}

.hoverbox img
{
	background: #fff;
	border-color: #aaa #ccc #ddd #bbb;
	border-style: solid;
	border-width: 1px;
	color: inherit;
	padding: 2px;
	vertical-align: top;
	width: 100px;
	height: 75px;
}

.hoverbox li
{
	background: #eee;
	border-color: #ddd #bbb #aaa #ccc;
	border-style: solid;
	border-width: 1px;
	color: inherit;
	display: inline;
	float: left;
	margin: 3px;
	padding: 5px;
	position: relative;
}

.hoverbox .preview
{
	border-color: #000;
	width: 200px;
	height: 150px;
}
@hoverbox_ie_fixes.css
.hoverbox a
{
	position: relative;
}

.hoverbox a:hover
{
	display: block;
	font-size: 100%;
	z-index: 1;
}

.hoverbox a:hover .preview
{
	top: -38px;
	left: -50px;
}

.hoverbox li
{
	position: static;
}
@hoverbox.html

<title>Hoverbox </title>
<link rel="stylesheet" href='css/hoverbox.css'
     type="text/css" media="screen, projection" />
<!--[if IE]>
<link rel="stylesheet" href='css/hoverbox_ie_fixes.css' type="text/css"
     media="screen, projection" />
<![endif]-->
</head>
<body>

<body>
<ul class="hoverbox">
  <li>
  <a href="#"><img src="img/photo01.jpg" alt="" />
      <img src="img/photo01.jpg" alt="" class="preview" /></a>
  </li>
  <li>
  <a href="#"><img src="img/photo02.jpg" alt="" />
      <img src="img/photo02.jpg" alt="" class="preview" /></a>
  </li>
  <li>
  <a href="#"><img src="img/photo03.jpg" alt="" />
      <img src="img/photo03.jpg" alt="" class="preview" /></a>
  </li>
</ul>
The link to this site is free.   /   Last Updated : 28.May.2012   
Copyright © ESPRITS STYLE. 2008   /   ご意見、感想、苦情は、 こちらへ...
counter