工作笔记1

 

window.  history.go(1)    前进
window.  history.go(-1)  后退 

.clear {

clear: both;

height: 1px;

margin-top: -1px;

overflow: hidden;

}

.clearfix:after {

content: "";

display: block;

height: 0px;

clear: both;

}

-------------------------------------------------------------------------------------------------------------------

垂直居中:

第一种方法:外层设置相对定位且浮动,left:50%,这样左边位置就偏移到了中间的位置;然后内层设置相对定位,left:-50%,这样正好向左偏移自身宽度的一半,实现了居中。

html:让inner居中
 
.wrap{float:left;position:relative;left:50%;}
.inner{position:relative;left:-50%;}
 
第二种办法:外层使用text-align:center;我们知道text-align:center是让里面的内联元素居中,很显然在外层设置text-align:center后,我们让里面的元素变成内联元素即可,则可以对里面元素使用display:inline-block;*display:inline(兼容IE6-7)

 ------------------------------------------------------------------------------------------------------------------

蒙版/渐变 

background: -moz-linear-gradient(top, #041d2a, #1379ab);
background: -webkit-gradient(linear,top,from(#041d2a),to(#1379ab));
background: -webkit-linear-gradient(top, #041d2a, #1379ab);
background: -o-linear-gradient(top, #041d2a, #1379ab);

猜你喜欢

转载自www.cnblogs.com/City-wall/p/10456584.html