09 2016 档案

摘要:很多时候我们需要把一个元素在其父级容器里水平、垂直居中对齐。以下我列出了常用的几种方法:1、在知道子元素宽度与高度的情况下进行居中,采用位置定位:absolute + margin 2、在不知道子元素高与宽的情况下,采用位置定位:absolute + transform 3、采用 flexbox 进 阅读全文
posted @ 2016-09-20 14:20 web倩倩 阅读(243) 评论(0) 推荐(0)
摘要:$('#add_img').on('change', function(){ var objUrl = getObjectURL(this.files[0]) ; if (objUrl) { $(this).prev("img").attr("src", objUrl); } }); functio 阅读全文
posted @ 2016-09-09 14:43 web倩倩 阅读(962) 评论(0) 推荐(0)
摘要:min-height: 4rem; margin-top: -1px; background: -webkit-gradient(linear,left top,left bottom,from(#fff),color-stop(.5,#fff),color-stop(.5,transparent) 阅读全文
posted @ 2016-09-09 14:42 web倩倩 阅读(905) 评论(0) 推荐(0)