首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >挠曲盒中的意外失真

挠曲盒中的意外失真
EN

Stack Overflow用户
提问于 2020-06-04 20:43:16
回答 1查看 137关注 0票数 0

我有三个均匀的列使用挠性盒。在CodePen中,它看上去更清楚:https://codepen.io/pixy-dixy/pen/KKVwvoQ

以下是代码:

代码语言:javascript
运行
复制
.rowIdeas {
  text-align: center;
  display: flex;
  justify-content: space-around;
  flex-direction: row-reverse;
}

.columnIdeas {
  flex-basis: 25%;
}

.maxSize {
  max-height: 300px;
}
代码语言:javascript
运行
复制
<!-- about ideas section start -->

<div class="rowIdeas">
  <div class="columnIdeas iransansdnlight">
    <div>
      <img class="maxSize" src="https://langfox.ir/vc/philosophy.svg">
      <h2>Item one</h2>
      <p>Flex items do not need to be block level unless the content they contain requires it. Also, you've prefixed all of the display properties, but didn't prefix any of the other Flexbox properties (which have different names in the other drafts).</p>
    </div>
  </div>
  <div class="idea columnIdeas iransansdnlight">
    <div>
      <img class="maxSize" src="https://langfox.ir/vc/idea.svg">
      <h2>item two</h2>
      <p>Flex items do not need to be block level unless the content they contain requires it. Also, you've prefixed all of the display properties, but didn't prefix any of the other Flexbox properties (which have different names in the other drafts).
    </div>
  </div>
  <div class="columnIdeas iransansdnlight">
    <div>
      <img class="maxSize" src="https://langfox.ir/vc/results.svg">
      <h2>item three</h2>
      <p>Flex items do not need to be block level unless the content they contain requires it. Also, you've prefixed all of the display properties, but didn't prefix any of the other Flexbox properties (which have different names in the other drafts).</p>
    </div>
  </div>
</div>

<!--  about ideas section ends -->

代码在这里和在CodePen,中运行良好,但是当我将相同的代码放到我的登陆页面时,我看到了这个

正如你所看到的,第一个比其他的要高一点。

知道问题出在哪里吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-06-04 20:50:11

问题是svg图像是不同比例的。所以左边的那个更短,所以标题不会像其他的一样低。你要么给他们一个特定的高度,重新做,使他们都是相同的高度,或以其他方式解释不同的大小。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62203778

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档