网站css

common: 初始化公共样式 大型网站可以复制公共样式 

各大网站初始化集合

<div class="top w990">w990是公共样式 2个样式后面的会覆盖前面的样式  

背景定位 :

左上角默认为00 x轴y轴

吸管里的标尺工具 shift键自动水平摆放 background:url(..\images\aa.jpg)  no-repeat;

 background-position :-152px -80px;

a标签里放span标签 专门放小图标 对span设置宽高(inlineblock)对span设置背景background:url(..\images\aa.jpg)  no-repeat -152px -80px;

a:nth-child(2){

 

}//伪选择器h5子元素选择方法 

 

<div class="box"></div>

#box{

  width:200px;

  height:200px;

  background:skyblue;

  margin-left:205px;

}

display:none;隐藏

<script>

  function show() {

    var box = document.getElementById("box");

    box.style.display = "block";

}

</script>

调用这个函数

<a    onmouseover="show()"  onmouseout="show()"></a>

<div id="box">我一会出现一会隐藏</div>

 

posted @ 2017-04-11 20:35  Distance&&  阅读(169)  评论(0编辑  收藏  举报