简体   繁体   English

CSS / jQuery:布局内复杂的可编辑内容

[英]CSS/jQuery: Complex editable content inside layout

I have a pretty complex layout and editable content. 我有一个非常复杂的布局和可编辑的内容。

My layout looks like this: 我的布局如下所示:

Layout 布局

The whole element is 100% width and the two lines/borders will take up the space that remains. 整个元素的宽度为100%,两条线/边框将占用剩余的空间。 The numbers in the text is editable, so the width of the text may change. 文本中的数字是可编辑的,因此文本的宽度可能会改变。 Anybody have any smart solutions with either jQuery or CSS? 有人有使用jQuery或CSS的任何智能解决方案吗?

Someone correct me if I'm wrong, but I assume Flexbox will adapt to this just fine: 如果我错了,请有人纠正我,但我认为Flexbox会适应这种情况:

 .container { display: flex; } .line { flex-grow: 1; height: 2px; background: #000; } 
 <div class="container"> <div class="text">Text</div> <div class="line"></div> <div class="text">Text</div> <div class="line"></div> <div class="text">Text</div> </div> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM