wyy0711020419 2016-12-05 12:54 采纳率: 25%
浏览 913
已采纳

搜索框repeat-x实现不了,求解~~

 <!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>HTML+CSS实战</title>
   <link rel="stylesheet" href="css/style.css"/>

</head>
<body>
<div class="header">
    <div class="top">
        <div class="wp">
            <div class="z">
                <span ><a href="">设为首页</a></span>
                <span ><a href="">收藏本站</a></span>
            </div>
            <div class="y">
                <span>2016年11月30日</span>
                <span class="mr">多云/16度</span>
                <!--注意设置这个span的右边距为0-->
            </div>
        </div>


    </div>
    <div class="logos">
        <div class="logo">
            <h1><a href="INDEX.html" alt="html+css 实战"><img src="images/logo.gif"/></a></h1>
        </div>
        <div class="sousuo">
            <table>
                <tr>
                    <td class="s_z z"> </td>
                    <td class="s_c z">
                        <input type="text" name="text" id="s_c_txt"/>
                    </td>
                    <td class="s_y z">
                        <button type="submit" name="submit"></button>
                    </td>
                </tr>
            </table>
        </div>
        <div class="dianhua"></div>

    </div>
    <div class="nav"></div>

</div>
<div class="center">
    <div class="ad"></div>
    <div class="jianjie"></div>
    <div class="xinwen"></div>
    <div class="chanpin"></div>
</div>
<div class="footer">
    <div class="footer-top"></div>
    <div class="footer-bottom"></div>

</div>


</body>

</html>

style.css

/*通用样式*/
*{margin:0;padding:0;}/*去掉所有的margin*/
body{font:微软雅黑;14px/24px;}
.top{
    width:100%;
    height:24px;
    background-color: #333333;
     line-height:24px;
    color:#d8d8d8;
}
.wp{width:960px;height:24px;margin:0 auto;}
/*注意*/
.z{float:left;}
.y{float:right;}
.top a{color:#d8d8d8;text-decoration:none;}
/*注意 如何定义class里面的超链接颜色 注意去掉下划线*/
.top a:hover{color:#f60;}
/*记得定义鼠标放上去时字体颜色*/
.top span{margin-right:14px;}
.top span .mr:{margin:0;}

/*sousuo*/
.sousuo{
    width:400px;
    height:41px;
}
.sousuo td{
    height:41px;
    width:6px;
}
.s_z{
    width:5px;
    height:41px;
    background: url("../images/s-z.gif") no-repeat;
}
.s_c{
    width:240px;
    height:41px;
    background: url("../images/s-c.gif") repeat-x;
}
.s_y{
    width:6px;
    height:41px;
    background: url("../images/s-r.gif") no-repeat;
}

图片说明

  • 写回答

2条回答 默认 最新

  • Go 旅城通票 2016-12-06 02:07
    关注
     .sousuo td{
        height:41px;
        width:6px;
    }
    

    你自己设置了宽度为6啊。。那个有input的去掉宽度设置

     <td class="s_c z" style="width:auto">
                                <input type="text" name="text" id="s_c_txt" />
                            </td>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题
  • ¥15 wpf界面一直接收PLC给过来的信号,导致UI界面操作起来会卡顿
  • ¥15 init i2c:2 freq:100000[MAIXPY]: find ov2640[MAIXPY]: find ov sensor是main文件哪里有问题吗
  • ¥15 运动想象脑电信号数据集.vhdr
  • ¥15 三因素重复测量数据R语句编写,不存在交互作用
  • ¥15 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了