我正在与一个内容可编辑的div一起工作,我已经为其设置了一个高度,并试图用def search_by_extension(self, extension):
cursor.execute("""SELECT * FROM files
WHERE extension LIKE ?""", ('%' + extension + '%',))
和overflow: hidden;
将该字段切成高低,但是没有隐藏任何那个文本,它只是使div溢出。我该如何解决?
text-overflow: hidden;
#editor {
height: 1100px;
border: .5px solid gray;
padding: 75px;
padding-bottom: 75px;
text-overflow: clip;
}
#editor:focus {
outline: none;
}
答案 0 :(得分:1)
尝试用overflow-y: scroll
代替#editor
#editor {
height: 1100px;
border: .5px solid gray;
padding: 75px;
padding-bottom: 75px;
text-overflow: clip;
overflow-y: scroll;
}
#editor:focus {
outline: none;
}
<div id="editor" contenteditable="true"></div>