leapovo 2022-10-20 11:33 采纳率: 100%
浏览 20
已结题

请问下面“立即选购”这边内外边距都没加,为什么会自动显示有空隙啊

请问下面立即选购这边内外边距都没加,外面的盒子也没加,为什么会自动显示有空隙啊求解答555

img


```css
* {
        margin: 0px;
        padding: 0px;
      }
      .box {
        box-sizing: border-box;
        width: 260px;
        height: 450px;
        margin: 50px auto;
        border: 1px solid black;
      }
      .pic {
        padding-top: 10px;
        text-align: center;
      }
      img {
        width: 50%;
      }
      .info {
        height: 40px;
        line-height: 20px;
        color: gray;
        font-size: 14px;
        margin: 0px 10px;
      }
      .jiage {
        height: 20px;
        line-height: 20px;
        margin-top: 30px;
        color: red;
        font-size: 25px;
        margin: 30px 10px 0px;
      }
      .jiage span {
        color: gray;
        font-size: 14px;
        text-decoration: line-through;
      }
      .xiaoshou {
        height: 15px;
        font-size: 12px;
        color: gray;
        line-height: 15px;
        margin-top: 15px;
        padding: 0px 10px;
      }
      .box3 {
        display: inline-block;
        width: 120px;
        height: 12px;
        line-height: 15px;
        border: 1px solid red;
        border-radius: 7px;
        padding: 1px;
      }
      .box3 .jdt {
        width: 87%;
        height: 100%;
        background-color: red;
        border-radius: 6px 0 0 6px;
        transition: width 1s;
      }
      .box3:hover .jdt {
        width: 100%;
        border-radius: 6px;
      }
      .footer {
        margin-top: 10px;
        width: 100%;
        height: 40px;
        background-color: red;
        line-height: 40px;
        text-align: center;
      }
      .footer a {
        text-decoration: none;
        color: white;
        font-size: 20px;
      }

 <body>
    <div class="box">
      <div class="pic"><img src="images/111.png" alt="" /></div>
      <div class="info">
        Apple苹果iphone X (A1699) 32G 金色 移动联通电信4G手机
      </div>
      <div class="jiage">
        ¥6088
        <span>¥6988</span>
      </div>
      <div class="xiaoshou">
        已售<e>87%</e>
        <div class="box3"><div class="jdt"></div></div>
        剩余<e>29</e><div class="footer"><a href="#">立即抢购</a></div>
      </div>
    </div>
  </body>

```

  • 写回答

3条回答 默认 最新

  • づGeranium☆う 2022-10-20 11:56
    关注

    img

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

问题事件

  • 系统已结题 10月28日
  • 已采纳回答 10月20日
  • 创建了问题 10月20日

悬赏问题

  • ¥30 eclipse开启服务后,网页无法打开
  • ¥30 雷达辐射源信号参考模型
  • ¥15 html+css+js如何实现这样子的效果?
  • ¥15 STM32单片机自主设计
  • ¥15 如何在node.js中或者java中给wav格式的音频编码成sil格式呢
  • ¥15 不小心不正规的开发公司导致不给我们y码,
  • ¥15 我的代码无法在vc++中运行呀,错误很多
  • ¥50 求一个win系统下运行的可自动抓取arm64架构deb安装包和其依赖包的软件。
  • ¥60 fail to initialize keyboard hotkeys through kernel.0000000000
  • ¥30 ppOCRLabel导出识别结果失败