试试这样?<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>test</title>
<style type="text/css">
.test{position:absolute;clip:rect(20px 150px 70px 0px)}
</style>
</head>
<body>
<a href="http://www.google.cn"><img src="http://www.google.cn/intl/zh-CN/images/logo_cn.gif" class="test"/></a>
</body>
</html>

解决方案 »

  1.   

    做到这步了,但是图片无法填充整个div背景
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
     <HEAD>
      <TITLE> New Document </TITLE>
      <META NAME="Generator" CONTENT="EditPlus">
      <META NAME="Author" CONTENT="">
      <META NAME="Keywords" CONTENT="">
      <META NAME="Description" CONTENT="">
      <style type="text/css">
    div#bigBox{
    background-image: url(http://t2.baidu.com/it/u=2260984201,3807021784&fm=3&gp=41.jpg);
    border:solid;
    width:100%;
    height:100%;
    }
    div#firstBox{
    border:solid;
    width:100%;
    height:32%;
    }
    div#secondBox{
    border:solid;
    width:100%;
    height:36%;
    }div#thirdBox{
    border:solid;
    width:100%;
    height:32%;
    }
      </style>
      <script type="text/javascript">
    function Onclick(url){
    window.open(url);
    }
    function myClick(){
    document.getElementById('firstBox').style.backgroundImage = "url(http://avatar.profile.csdn.net/E/A/4/2_varlj.jpg)";
    document.getElementById('thirdBox').style.backgroundImage = "url(http://avatar.profile.csdn.net/E/A/4/2_varlj.jpg)";
    }
      </script>
     </HEAD> <BODY>
    <div id="bigBox">
    <div id="firstBox"></div>
    <div id="secondBox" align="center">
    <input type="button" id="baidu" height=10px onclick="Onclick('http://www.baidu.com')" value="去百度"/><br/>
    <input type="button" id="baidu" height=10px onclick="myClick()" value="改变"/><br/>
    </div>
    <div id="thirdBox">ddd</div> </div>
      
     </BODY>
    </HTML>
      

  2.   

    function myClick(){
        document.getElementById('bigBox').style.backgroundImage = "url(http://avatar.profile.csdn.net/E/A/4/2_varlj.jpg)";
    }