html - 当我在 Internet Explorer 中调整大小时

标签 html css

嘿,谁能帮我解决这个问题

当我在 IE 中调整浏览器大小时,最初显示在底部的两个图像必须彼此相邻显示

所有 HTML 代码都是用 javascript 编写的,您不能更改 HTML 中的任何内容,但可以更改 CSS 中的代码

enter image description here

div.card {
  display: table;
  overflow: hidden;
}
.card .charts {
  position: relative;
  display: table-cell;
  vertical-align: middle;
}
.card div.chart {
  height: 100%;
  width: 100%;
}
/*.card .chart { min-height: 200px; }*/

.card table.chart {
  min-height: 0;
}
.card div.chart:empty {
  display: none;
}
div.card > div.chart-name {
  font-size: 16px;
  padding-bottom: 14px;
}
div.card > div.chart-key {
  font-size: 12px;
  padding-top: 5px;
  clear: both;
}
div.card > div.chart-key > span {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #dadada;
}
div.card > div.chart-key > span + span {
  margin-left: 5px;
}
.card {
  width: 100%;
  padding: 5px 20px 5px 20px;
  margin-bottom: 0px;
  background: #ffffff;
  box-shadow: 1px 1px 1px #dfdfdf;
  box-sizing: border-box;
}
.card {
  width: 100%;
  padding: 5px 20px 5px 20px;
  margin-bottom: 0px;
  background: #ffffff;
  box-shadow: 1px 1px 1px #dfdfdf;
  box-sizing: border-box;
}
<div class="card " data-tab="Climate Survey" data-tab_sub="Climate Survey" data-controluid="E215EDBB-055F-1995-ED3972A87BABCA7B"></div>
<div class="charts">
  <div id="Chart_Bar_4" class="chart" style="width: 441px; height: 300px;"></div>
  <svg xmlns:ct="http://gionkunz.github.com/chartist-js/ct" class="ct-chart-bar ct-horizontal-bars">
    <g class="ct-grids">

->

最佳答案

你有不同高度的 block 并应用 float: left 到它们。

有不同的可能解决方案:

  • 确保所有 block 的高度相同。
  • 使用 inline-block 而不是 float
  • 使用 flexbox。

关于html - 当我在 Internet Explorer 中调整大小时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40992886/

相关文章:

javascript - countUp() 和 countUp 之间的区别

javascript - 从另一个弹出窗口打开一个弹出窗口

html - 水平列表中的垂直列表

css - reactjs- Bootstrap : input width within table same for all columns irrespective of column contents

html - 在页眉和页脚之间调整 div 大小的问题

javascript - 隐藏带有未定义字符串的列表项

javascript - 如何使图像用作复选框?

javascript - 检测特定属性的可用 css 值

html - 为什么只有按下提交按钮时,网络主机所播放的html音频才会播放

html - 优先处理部分 CSS 选择器