css3 加载瀑布流 column-coun属性
来源:互联网 发布:sd卡受损数据恢复 编辑:程序博客网 时间:2024/05/16 17:02
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/main.css">
<script type="text/javascript" src="../lib/jquery/jquery-1.11.1.min.js"></script>
<title></title>
</head>
<style>
* {
padding: 0;
margin: 0;
}
#main {
-webkit-column-count: 4;
-moz-column-count: 4;
column-count: 4;
-moz-column-gap:20px;
-webkit-column-gap:20px;
column-gap:20px;
padding: 10px;
}
.box {
padding: 15px;
border: solid 2px #eeeeee;
border-radius: 4px;
margin-bottom: 15px;
cursor: pointer;
}
.box img {
width: 100%;
}
</style>
<body>
<div id="main">
<div class="box">
<div class="pic">
<img src="meinv.png">
</div>
</div>
<div class="box">
<div class="pic">
<img src="meinv.png">
</div>
</div>
<!-- 这里省略多个class为box的div-->
<div class="box">
<div class="pic">
<img src="meinv.png">
</div>
</div>
</div>
</body>
<script type="text/javascript">
var width = 300, height = 300;
$('.box img').each(function(){
// 随机图片的高宽,如果大小一样,就没必要用瀑布流了
width = Math.floor(Math.random() * 100) + 300;
height = Math.floor(Math.random() * 500) + 300;
$(this).attr('src', 'http://placekitten.com/'+ height +'/' + width);
});
</script>
</html>
- css3 加载瀑布流 column-coun属性
- CSS3的column实现瀑布流效果
- JavaScript、jQuery、css3实现瀑布流加载
- css3实现瀑布流布局+缺点用户体验差,但是性能高于js,jq,使用column属性
- 关于css3 分栏 column属性
- Css3实现瀑布流
- CSS3实现瀑布流
- Css3瀑布流效果
- CSS3瀑布流
- css3 多列显示属性column
- CSS3属性之多栏布局column
- CSS3属性之多栏布局column
- css3实现瀑布流效果
- CSS3实现瀑布流方法?
- CSS3实现瀑布流效果
- css3瀑布流卡片展示
- 瀑布流加载数据
- thinkphp瀑布流加载
- 抽象模板-计算程序的执行时间
- html网页渲染的基本过程
- Spring
- 新手安卓开发小知识
- 文章标题
- css3 加载瀑布流 column-coun属性
- 误删除oracle数据的恢复指令
- 项目开发流程概要
- C++ const用法 尽可能使用const
- Rabbitmq集群及使用keepalived实现rabbitmq高可用性集群
- 14、TensorFLow 变量命名空间
- unity 360°全景图
- 线性结构4 Pop Sequence
- touch:按下时震动,松开时停止