如何使浮动内部div与最高div相同的高度

编程入门 行业动态 更新时间:2024-10-23 03:21:03
本文介绍了如何使浮动内部div与最高div相同的高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在下面的代码中,我希望div与'y'匹配div的高度与3'x的。

In the following code I would like the div with 'y' to match the height of the div with the 3 'x's.

<div style="border: 0px solid red; margin: 0px 0px 5px; overflow: hidden;"> <div style="border: 1px solid rgb(129, 11, 0); margin: 0px; padding: 5px; background-color: rgb(30, 23, 22); width: 312px; float: left;"> x<br/>x<br/>x </div> <div style="border: 1px solid rgb(129, 11, 0); margin: 0px; padding: 5px; width: 312px; background-color: rgb(30, 23, 22); float: right;"> y </div>

divs是浮动的。

推荐答案

如果你不对jQuery的一点,你可以使用 EqualHeight ,它应该做你想要的

If you're not adverse to a spot of jQuery, you can use EqualHeight, it should do what you want

更多推荐

如何使浮动内部div与最高div相同的高度

本文发布于:2023-10-08 01:45:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1471153.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:高度   div

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!