#close{
background: url("../images/boxy_btn.png") no-repeat;
width:28px;
height:28px;
float: right;
margin-right: -10px;
margin-top: -10px;
cursor: pointer;
}
这个代码里,我把width和height去掉,背景图就显示不出来了,能解释一下吗
background: url("../images/boxy_btn.png") no-repeat;
width:28px;
height:28px;
float: right;
margin-right: -10px;
margin-top: -10px;
cursor: pointer;
}
这个代码里,我把width和height去掉,背景图就显示不出来了,能解释一下吗
2016-09-24
已采纳回答 / GavinZeng
这就是常说的雪碧图方法了,简单来说就是插入一张较大的背景图,然后使用参数限定背景图中的某一部分显示在元素背景上。background: url('../images/login_window_logo.png') no-repeat -210px -0px;这条语句的意思是:插入背景图:../images/login_window_logo.png;不重复显示该背景:no-repeat-210px -0px:从背景图的-210px -0px;坐标开始,截取背景图中大小为width: 200px;heigh...
2016-09-24
<script>
function a(){
alert('a');
}
function b(){
alert('b');
}
var o = document.getElementById('btn3');
o.onclick=function(){
a();
b();
}
</script>
function a(){
alert('a');
}
function b(){
alert('b');
}
var o = document.getElementById('btn3');
o.onclick=function(){
a();
b();
}
</script>
2016-09-24
我把attachEvent和addEventListener混写成attachEventListener了,大家注意吧
2016-09-23