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


浙公网安备 33010602011771号