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 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
  • ¥15 再不同版本的系统上,TCP传输速度不一致
  • ¥15 高德地图点聚合中Marker的位置无法实时更新
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式