**已关闭。**此问题需要debugging details。它目前不接受回答。
编辑问题以包括desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem。这将帮助其他人回答这个问题。
昨天关门了。
Improve this question
这里有一个简单的网页:https://jsfiddle.net/enxgz2Lm/1/
它分为side menu
和tasks container
。tasks container
包含一个row container
,它被分为checkbox
,title
在左边,details
在右边。
关于title
的问题
这个元素是可编辑的(使用contenteditable=“true”),我希望它是这样的,而不是使用input
标签的原因。我希望它采取100%的自由空间,如果文本比自由空间长,它应该显示一部分的文字填补自由空间和隐藏其余(不打破成新的行)。
正如你在我提供的网页中看到的,我能够做我需要的,但问题是,我不知道如何保持title
的宽度为100%的可用空间。
PS:如果你取消注解CSS line width:470px 你可以看到网页应该是什么样子大约
1条答案
按热度按时间8yoxcaq71#
首先添加
.side-menu-container { flex: none; }
(或min-with:150px
)。其次,添加
.tasks-contianer { flex: auto; }
而不是width: 100%;
为了防止拉伸,您需要添加.tasks-contianer { min-width: 0; }
(或overflow: hidden
):