随笔分类 - css
摘要:网上搜了好几种办法,实现出来的瀑布流效果如下: 这里有个弊端,这并不符合瀑布流的原理,如果使用纯css写瀑布流,则每一块都是从上往下排列,不能做到从左到右排列,并且不会识别哪一块图片放在哪个地方合适,若是再配合动态加载,效果会特别不好 我们想要的瀑布流是什么样的? 因为我是两竖排所以可以用Float
阅读全文
摘要:box-shadow: 0 2px 10px 0 rgba(0,0,0,.1);
阅读全文
摘要:代码: <div style="background:linear-gradient(to left,#FFFFFF,#b6b6b6,#FFFFFF);height:1px;"></div> 使用background属性中的渐变参数,linear-gradient,通过参数定义渐变色,定义一个从左到
阅读全文
摘要:active伪类解决 HTML代码 <div class='box'> </div> CSS代码 .box { width: 100px; height: 100px; background: green; transition: transform 0.3s ease-out; } .box:ac
阅读全文
摘要:/* offset-x | offset-y | color */ box-shadow: 60px -16px teal; /* offset-x | offset-y | blur-radius | color */ box-shadow: 10px 5px 5px black; /* offs
阅读全文
摘要:.list ul li:nth-child(even){ ...} //li的偶数行样式 .list ul li:nth-child(odd){ ...} //li的奇数行样式 .list ul li:nth-child(1){ top:0;} //第一个li.list ul li:nth-chil
阅读全文