這是我剛創建的一個div。當我輸入內容時,我給出了一個White-space: Normal
函數用於換行。該功能可在Chrome,Opera和Safari瀏覽器中使用。但這些文字並未包含在Mozilla Firefox和Edge瀏覽器中。我也嘗試了Word-wrap: break-word
函數。這也不起作用。請給我一個解決方案。換行不起作用
<div class = "list-name-field" id = "SAVE_LIST" style = "white-space: normal; width: 240px; min-height: 35px; border-radius: 3px; margin-left: auto; margin-right: auto; background-color: #ccc; margin-top: 5px; " contenteditable = "true" data-placeholder = "Add a List..."></div>
這是工作。非常感謝。 –