#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