已采纳回答 / 慕盖茨4878874
1.首先用一个aLi变量承载<li>标签(getElementsByTagName('li')就是指li标签)。 2. for(var i=0; i<aLi.length; i++){};就是从第一个<li>标签开始遍历<li>标签3. aLi[i].onmouseover=function(){};查看你是否用鼠标覆盖其中的一级标签4. oSubNav = this.getElementsByTagName('ul')[0];用变量 oSubN...
2016-07-30
用border-radius写的,希望可以给大家参考
a{color:black; text-decoration: none;display: block;background-color: #ccc;height: 25px;
width: 100px;text-align: center;line-height: 25px;border-top-left-radius: 12px;
border-top-right-radius: 12px;}
a{color:black; text-decoration: none;display: block;background-color: #ccc;height: 25px;
width: 100px;text-align: center;line-height: 25px;border-top-left-radius: 12px;
border-top-right-radius: 12px;}
2016-07-29
圆角边框:
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
2016-07-29
最赞回答 / 猫子0712
可以把时间间隔30毫秒调到100毫秒试试其实抖动效果是因为当你的鼠标离开左边的时候,触发了左边盒子的onmouseout事件,与此同时,鼠标移到了右边,也就是触发了右边盒子的onmouseover事件,这两个事件同时进行,也就是左边盒子往回缩的同时,右边的盒子在伸长,但是左边盒子往回缩会造成右边盒子往左移动,于是右边的盒子同时在进行左移和向右伸长,而且频率很快(每30毫秒),看起来就像是在抖动一样
2016-07-28