这个图片的空白处 添入背景图片 背景图片超过的部分隐藏该怎么弄大家注意边框是不规则的。求救了。

解决方案 »

  1.   

    背景透明的图片可以找美工帮你弄
    但背景透明的png图片在IE6下透明部分还是会出现灰色背景
    这个可以通过一些兼容性的样式去控制比如(下面是来源于网络,本人没去验证,你自己可以去验证一下):
    background: url(icon_home.png) no-repeat !important;/* FF IE7 */
    _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='icon_home.png'); /* IE6 */
    _ background-image: none; /* IE6 */
      

  2.   

    文字照常写,再弄一个层,一张gif图作背景,层z-index比文字层高,直接盖上去就能模拟了。
      

  3.   

    [code]
    <?php
    $sid=null;
    session_start(); 
    if($_SESSION['sid']) {
    header("Location: /stuqueryhwk.php"); 
    die();
    }
    $sid=$_SESSION['sid'];
    ?>
    <!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=utf-8" />
    <title>student</title>
    <meta name="generator" content="editplus" />
    <meta name="author" content="shirley(shirley.com)" />
    <link type="text/css" rel="stylesheet" rev="stylesheet" href="css/index.css" media="all" />
    </head>
    <body>
    <div id="header">
    <div id="head">
    <h1><a href="/">Shirley</a></h1>
    </div>
    <div id="nav">
    <ul>
    <li><a href="/">首页</a></li>
    <li><a href="stuqueryhwk.php">成绩查询</a></li>
    <li><a href="password.php">修改密码</a></li>
    <li><a href="input.php">录入学生成绩</a></li>
    <li><a href="studentmanage">录入学籍信息</a></li>
    </ul>
    </div>
    </div>
    <div id="main">
    <form method="post" action="login.php" id="content" class="corn">
    <fieldset>
    <legend>请登陆</legend>
    <p>
    <label>年级 </label>
    <select id="grade" name="grade">
    <option value="2011">2011</option>
    </select>
    </p>
    <p>
    <label>班级 </label>
    <select id="classnum" name="classnum">
    <option value="11">11</option>
    <option value="12">12</option>
    </select>
    </p>
    <p>
    <label>学号 </label>
    <input type="text" id="stunum" name="stunum" maxlength="2"/>
    </p>
    <p>
    <label>密码 </label>
    <input type="password" id="pwd" name="pwd"/>
    </p>
    <?php
    if($_GET["err"]==1) {
    echo "<p style='color:red;'>用户名或密码没有填写。初始密码为111111。如需帮助请发邮件给管理员。</p>";
    }
    if($_GET["err"]==2) {
    echo "<p style='color:red;'>用户名或密码错误。初始密码为111111。如需帮助请发邮件给管理员。</p>";
    }
    ?>
    <p>
    <label class="hide"><input type="checkbox" id="rememberme" /> 记住我的登录信息</label>
    <button type="submit" id="login">Go!</button>
    </p>
    <p class="hide">
    <a href="">忘记密码?</a>
    </p>
    </fieldset>
    </form>
    <div id="sidebar" class="corn">
    <div class="panel">
    <h2>友情提示</h2>
    <p>请输入学号和密码登陆,默认密码为:111111。如默认密码有问题,请直接发送邮件给管理员。</p>
    </div>
    <div class="panel">
    <h2>有其他问题?</h2>
    <p>请发送电子邮件:  <br /><img src="../images/mail.png" alt="email" /></p>
    <p>或者可以上 <a href="http://twitter.com/shirley">Twitter</a> 直接交谈。</p>
    </div>
    <div class="panel">
    <h2>推荐使用</h2>
    <p>建议使用Firefox浏览器来浏览本站以获得最佳效果。</p>
    <p><a href="http://g-fox.cn">点击下载</a></p>
    </div>
    </div>
    <div class="clear"></div>
    </div>
    <div id="footer">
    <div id="foot">
    <a href="http://shirley.com">shirley</a> &copy; 2011
    </div>
    </div>
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/index.js"></script>
    </body>
    </html>
    [code]