开发者社区> 问答> 正文

IE浏览器下float之间出现的小缝隙?

screenshot

css如下:

全选复制放进笔记.report {
  width: 576px;
  padding: 10px 27px;
  background-color: #e6e5e5;
}
/* line 633, ../sass/other.scss */
.show_username {
  font-size: 14px;
  border-bottom: 10px;
}
/* line 638, ../sass/other.scss */
.comment_text {
  resize: none;
  width: 504px;
  height: 62px;
  border: 1px solid #139667;
}
/* line 645, ../sass/other.scss */
.submit_report {
  float: right;
  width: 66px;
  line-height: 68px;
  text-align: center;
  color: #fff;
  background-color: #139667;
}
.clearfix {
  *height: 1%;
}
/* line 4, ../sass/_once.scss */
.clearfix:after {
  clear: both;
  content: '.';
  display: block;
  height: 0;
  line-height: 0;
  overflow: hidden;
}

screenshot

展开
收起
a123456678 2016-05-27 16:48:28 2161 0
1 条回答
写回答
取消 提交回答
  • 如上所说,一起float:left就解决了,如果你想使用原有的方案,那就麻烦一点.
    首先你要知道不同浏览器对元素的预设css是不一样的,margin,padding什么的都不同,首先你就要消除这些差异.

       .comment_text {
            resize: none;
            width: 504px;
            height: 66px;
            border: 1px solid #139667;
            display: inline-block;
            padding: 0;
            margin: 0;
        }
        .clearfix {
            display: inline-block;
        }
    2019-07-17 19:18:16
    赞同 展开评论 打赏
问答分类:
问答标签:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
WEB浏览器中即将发生的安全变化 立即下载
基于浏览器的实时构建探索之路 立即下载
基于浏览器的实时构建探索之路--玄寂 立即下载