相关疑难解决方法(0)

为什么Firefox和Edge中的填充项目的百分比填充/边距不起作用?

我想在flexbox中有一个方形div.所以我使用:

.outer {
  display: flex;
  width: 100%;
  background: blue;
}
.inner {
  width: 50%;
  background: yellow;
  padding-bottom: 50%;
}
Run Code Online (Sandbox Code Playgroud)
<div class="outer">
  <div class="inner">
    <a>hehe</a>
  </div>
</div>
Run Code Online (Sandbox Code Playgroud)

这在Chrome中运行良好.但在Firefox中,父母只挤到一行.

我如何在Firefox中解决这个问题?我使用的是44版.

您还可以在https://jsbin.com/lakoxi/edit?html,css查看代码

html css firefox css3 flexbox

15
推荐指数
1
解决办法
7602
查看次数

标签 统计

css ×1

css3 ×1

firefox ×1

flexbox ×1

html ×1