<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>CSS swap hover effect - Jquery</title>
<style type="text/css">
body {
background:#f6f9e7;
font: 0.8em "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Verdana, Arial, Helvetica;
color: #444d27;
}
p, h1, h2, h3, h4 {
margin-bottom:1em;
font-weight:normal;
}
h2 {
font:1.8em Georgia, "Times New Roman", Times, serif;
text-align:center;
}
h3 {
font:1.5em Georgia, "Times New Roman", Times, serif;
}
a, img {
border:none;
}
a {
color:#d46e00;
text-decoration:none;
}
.center {text-align:center;}
#wrap {
width:800px;
margin:20px auto;
}
/* ---- styling the list ---- */
#work {
float:left;
list-style:none;
margin:0;
padding:0;
}
#work li {
float:left;
display:block;
width:235px;
margin:10px;
display:inline;
padding:3px;
background:#fff;
border:1px solid #cad789;
height:154px;
}
#work li a {
border:none;
}
#work p {
margin-bottom:0;
}
/* ---- show-hide elements ---- */
#work li .show{
display:block;
width:235px;
height:154px;
}
#work li .hide {
color:#d4df9d;
text-align: left;
height: 0;
overflow: hidden;
background:#687b00;
}
#work li:hover .hide, #work li.over .hide {
cursor: pointer;
height: 133px;
padding:10px;
width:215px;
}
#work li:hover .show, #work li.over .show {
height: 0;
overflow: hidden;
}
#work li a {
color:#e9ff73;
font-size:1.3em;
}
#work li a:hover {
color:#fff;
}
</style>
<!-- add hover class to #work li if the mouse over -->
<!--[if lte IE 7]>
<script type="text/javascript" src="jquery-1.2.3.min.js"></script>
<script type="text/javascript">$(function() {
$('#work li').mouseover
(function(){
$(this).addClass('over');
});
$('#work li').mouseout
(function(){
$(this).removeClass('over');
});
});
</script>
<![endif]-->
</head>
<body>
<div id="wrap">
<h2>CSS Hover Effect</h2>
<h4 class="center">With JQuery-based hover fix for IE6</h4>
<ul id="work">
<li>
<a class="show" href="#" title="SDDirect Website Development"><img src="images/sdd.jpg" alt="Social Developement Direct" /></a>
<div class="hide"><a href="#">SDDirect Website Development</a><p>Design and devevelopment the website and custom CMS for SDDirect</p></div>
</li>
<li><a class="show" href="#" title="Whitehorse Website Design" ><img src="images/whitehorse.jpg" alt="White Horse" /></a>
<div class="hide"><a href="#">Whitehorse Website Design</a><p>Design and develop XHTML/CSS for The White Horse Inn</p></div>
</li>
<li><div class="show"><a href="#" title="Lensview Gallery Design" class="thumb"><img src="images/lenseview.jpg" alt="White Horse" /></a></div>
<div class="hide"><a href="#">Lensview Gallery Design</a><p>Photo gallery design and integration for Bach Tran</p></div>
</li>
<li>
<a class="show" href="#" title="SDDirect Website Development"><img src="images/ard.jpg" alt="Social Developement Direct" /></a>
<div class="hide"><a href="#">SDDirect Website Development</a><p>Design and devevelopment the website and custom CMS for SDDirect</p></div>
</li>
<li><a class="show" href="#" title="Whitehorse Website Design"><img src="images/mpi.jpg" alt="White Horse" /></a>
<div class="hide"><a href="#">Whitehorse Website Design</a><p>Design and devevelopment the website and custom CMS for SDDirect</p></div>
</li>
<li><a class="show" href="#" title="Lensview Gallery Design"><img src="images/herbal.jpg" alt="White Horse" /></a>
<div class="hide"><a href="#">Lensview Gallery Design</a><p>Design and devevelopment the website and custom CMS for SDDirect</p></div>
</li>
</ul>
</div>
</body>
</html>
英图WEB
- 粉丝: 0
- 资源: 19
最新资源
- 集成 vuex 的原生 websocket.zip
- 针对 Google Places API 的 Vue.js 自动建议组件 .zip
- 通过动画跨路线共享组件.zip
- 适用于您的 Vue.js 项目的便捷 Moment.js 过滤器 .zip
- 适用于 Vue.js 的轻量级所见即所得 HTML 编辑器.zip
- 适用于 Vue.js 2.0 的表格(带有树形网格)组件 (其样式扩展了@iview).zip
- 适用于 Vue.js 2-3 的移动端图片文件输入组件,具有图像预览、拖放、EXIF 方向等功能.zip
- 适用于 Vue 的 HTML5 所见即所得编辑器.zip
- 适用于 Vue 的 At.js .zip
- 适用于 Vue 3 的简单、交互且高度可定制的甘特图组件.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈