<!DOCTYPE html>
<html lang="en"> <head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>瀑布流</title>
<link rel="stylesheet" href="css/style.css">
<script src="js/jquery-3.4.1.js" type="text/javascript"></script>
</head> <body> <section id="titleBar">
<h2>瀑布流</h2>
</section>
<div id="wrap">
<!-- wrap内快速生成里面div结构的快捷方式 -->
<!-- (div.box>div.info>((div.pic>img[src="img/$.jpg"])+(div.title>a[href=#]{This is a title})))*10 -->

<div class="box">
<div class="info">
<div class="pic"><img src="img/1.jpg" alt=""></div>
<div class="title"><a href="#">This is a title.</a></div>
</div>
</div>
<div class="box">
<div class="info">
<div class="pic"><img src="img/2.jpg" alt=""></div>
<div class="title"><a href="#">This is a title.</a></div>
</div>
</div>
<div class="box">
<div class="info">
<div class="pic"><img src="img/3.jpg" alt=""></div>
<div class="title"><a href="#">This is a title.</a></div>
</div>
</div>
<div class="box">
<div class="info">
<div class="pic"><img src="img/4.jpg" alt=""></div>
<div class="title"><a href="#">This is a title.</a></div>
</div>
</div>
<div class="box">
<div class="info">
<div class="pic"><img src="img/5.jpg" alt=""></div>
<div class="title"><a href="#">This is a title.</a></div>
</div>
</div>
<div class="box">
<div class="info">
<div class="pic"><img src="img/6.jpg" alt=""></div>
<div class="title"><a href="#">This is a title.</a></div>
</div>
</div>
<div class="box">
<div class="info">
<div class="pic"><img src="img/7.jpg" alt=""></div>
<div class="title"><a href="#">This is a title.</a></div>
</div>
</div>
<div class="box">
<div class="info">
<div class="pic"><img src="img/8.jpg" alt=""></div>
<div class="title"><a href="#">This is a title.</a></div>
</div>
</div>
<div class="box">
<div class="info">
<div class="pic"><img src="img/9.jpg" alt=""></div>
<div class="title"><a href="#">This is a title.</a></div>
</div>
</div>
<div class="box">
<div class="info">
<div class="pic"><img src="img/10.jpg" alt=""></div>
<div class="title"><a href="#">This is a title.</a></div>
</div>
</div>
</div> </body> </html>

css文件如下

body {
margin:;
padding:;
} body {
background: #ddd url(../img/bg.jpg) repeat;
} img {
border: none;
} a {
text-decoration: none;
color: #444;
} @-webkit-keyframes shade {
from {
opacity:;
}
15% {
opacity: 0.4;
}
to {
opacity:;
}
} @-moz-keyframes shade {
from {
opacity:;
}
15% {
opacity: 0.4;
}
to {
opacity:;
}
} @-o-keyframes shade {
from {
opacity:;
}
15% {
opacity: 0.4;
}
to {
opacity:;
}
} @-ms-keyframes shade {
from {
opacity:;
}
15% {
opacity: 0.4;
}
to {
opacity:;
}
} @keyframes shade {
from {
opacity:;
}
15% {
opacity: 0.4;
}
to {
opacity:;
}
} #titleBar {
width: 600px;
margin: 20px auto;
text-align: center;
} #wrap {
width: auto;
height: auto;
margin: 0 auto;
position: relative;
} #wrap .box {
width: 280px;
height: auto;
padding: 10px;
border: none;
float: left;
} #wrap .box .info {
width: 280px;
height: auto;
border-radius: 8px;
background: #fff;
} #wrap .box .info .pic {
width: 260px;
height: auto;
margin: 0 auto;
padding-top: 10px;
} #wrap .box .info .pic:hover {
-webkit-animation: shade 3s ease-in-out 1;
-moz-animation: shade 3s ease-in-out 1;
-o-animation: shade 3s ease-in-out 1;
-ms-animation: shade 3s ease-in-out 1;
animation: shade 3s ease-in-out 1;
} #wrap .box .info .title:hover {
-webkit-animation: shade 3s ease-in-out 1;
-moz-animation: shade 3s ease-in-out 1;
-o-animation: shade 3s ease-in-out 1;
-ms-animation: shade 3s ease-in-out 1;
animation: shade 3s ease-in-out 1;
} #wrap .box .info img {
width: 260px;
border-radius: 3px;
} #wrap .box .info .title {
width: 260px;
height: 40px;
margin: 0 auto;
line-height: 40px;
text-align: center;
color: #666;
font-size: 18px;
font-weight: bold;
overflow: hidden;
}

效果图如下

望各位大虾不吝赐教!

谢谢

最新文章

  1. django 补充篇
  2. 容易被忽略CSS特性
  3. Netbeans导入Nutch1.2
  4. [转]Tangram框架应用开发的一般模式
  5. bigworld源码分析(4)——BaseAppMgr分析
  6. python数据分析之pandas库的DataFrame应用二
  7. 用Jquery load text文本到網頁遇到的問題
  8. CC150 - 11.5
  9. ADF_Starting系列4_使用ADF开发富Web应用程序之维护User Interface(Part1)
  10. UVA 11354 Bond 邦德 (RMQ,最小瓶颈MST)
  11. nmap命令-----基础用法
  12. iOS 图片加载框架- SDWebImage 解读
  13. PageMapAdapter MapAdapter (续webServices)
  14. java之坑-----List中的重复添加同一对象
  15. 基于visual Studio2013解决面试题之0308Fibonacci数列
  16. Linux入门篇(一)——基本命令
  17. 解决OS睡眠功能中,移动鼠标就会唤醒
  18. LeetCode 476 Number Complement 解题报告
  19. Android : Error inflating class android.support.design.widget.NavigationView
  20. H5视频播放器属性与API控件,以及对程序的解释

热门文章

  1. mac python3 安装mysqlclient
  2. cad 画图面板的尺寸大小定义
  3. 第十二周LINUX学习笔记
  4. Go语言IDE远程连接Linux服务器
  5. Xshell 配置密钥
  6. seaborn---调色板
  7. Diagnostic Viewer 显示空白
  8. redis 哨兵集群原理及部署
  9. TestNg用例管理
  10. URI和URL的区别(转)