码迷,mamicode.com
首页 > Web开发 > 详细

html+css图片展示

时间:2015-02-26 10:01:15      阅读:164      评论:0      收藏:0      [点我收藏+]

标签:html5   图片   html   javascript   css   

<strong><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>MyHtml.html</title>
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
	<style type="text/css">
		*{margin:0px;}
		#imgList{width:989px;height:370px;}
		#imgList .box1{width:325px;height:370;
			float:left;margin-right:4px;}
		#imgList .box1 .top{width:325px;height:244px;margin-bottom:4px;}
		#imgList .box1 .bottom1{width:161px;height:120px;
			float:left;}
		#imgList .box1 .bottom2{width:161px;height:120px;
			float:right;}
		#imgList .box1 .common{position:relative;}
		#imgList .box1 .common p{width:100% ; height:0px;overflow:hidden;
			background:rgba(0,0,0,0.5);position:absolute;left:0px ;
				bottom:0px;text-align:center;padding-top:0px;}
	</style>
  </head>
  <body >
	<div id="imgList">
		<div class="box1">
			<div class="top common">
				<img src="images/pic1.jpg"/>
				<p><img src="images/button.png"></p>
			</div>
			<div class="bottom1 common">
				<img src="images/pic4.jpg"/>
				<p><img src="images/button.png"></p>
			</div>		
			<div class="bottom2 common">
				<img src="images/pic5.jpg"/>
				<p><img src="images/button.png"></p>
			</div>
		</div>
		
		<div class="box1">
			<div class="top common">
				<img src="images/pic2.jpg"/>
				<p><img src="images/button.png"></p>
			</div>
			<div class="bottom1 common">
				<img src="images/pic7.jpg"/>
				<p><img src="images/button.png"></p>
			</div>		
			<div class="bottom2 common">
				<img src="images/pic6.jpg"/>
				<p><img src="images/button.png"></p>
			</div>
		</div>
		
		<div class="box1">
			<div class="top common">
				<img src="images/pic3.jpg"/>
				<p><img src="images/button.png"></p>
			</div>
			<div class="bottom1 common ">
				<img src="images/pic8.jpg"/>
				<p><img src="images/button.png"></p>
			</div>		
			<div class="bottom2 common">
				<img src="images/pic9.jpg"/>
				<p><img src="images/button.png"></p>
			</div>
		</div>
	</div>
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" >
		$("#imgList .box1 .common").hover(
			function(){
				$(this).find("p").stop().animate(
					{height:"27px",paddingTop:"6px"},500);
			},function(){
				$(this).find("p").stop().animate(
					{height:"0px",paddingTop:"0px"},500);
			}
		);
	</script>
 </body>
</html>
</strong>
技术分享

html+css图片展示

标签:html5   图片   html   javascript   css   

原文地址:http://blog.csdn.net/u012651389/article/details/43941331

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!