I had the same regular meeting this morning and pointed out an error on one of my pages. The layers were stretched open. I was quite depressed at the time because I was testing in Chinese and there was no problem. They asked me to change it to English. It was ruined and changed beyond recognition. I was speechless. Change it, there is no way, the technology is not good enough~555~~ style="table-layout: fixed;WORD-BREAK: break-all; WORD-WRAP: break-word" grammar: parameter: grammar: parameter: illustrate: grammar: illustrate: <script type="text/javascript">
The above is just for complaining. You can save it and record the solution you found so that you can find it later.
================================================== ===
word-break : normal | break-all | keep-all
normal : Allow line breaks within words according to text rules for Asian and non-Asian languages
break-all : The behavior is the same as normal for Asian languages. Breaks within any word of a line of non-Asian language text are also allowed. This value is suitable for Asian text that contains some non-Asian text
keep-all : Same as normal for all non-Asian languages. For Chinese, Korean, and Japanese, word breaks are not allowed. Good for non-Asian text that contains a small amount of Asian text
word-wrap : normal | break-word
normal: Allow content to push beyond the specified container boundaries
break-word : Content will break within boundaries. If necessary, word-breaks can also occur
Sets or retrieves whether to break the line when the current line exceeds the boundary of the specified container.
table-layout : auto | fixed
http://www.knowsky.com/
parameter:
auto: The default automatic algorithm. The layout will be based on the contents of each cell. The table will not be displayed until each cell is read and calculated. Very slow
fixed: Fixed layout algorithm. In this algorithm, the horizontal layout is only based on the width of the table, the width of the table border, the cell spacing, and the width of the columns, and has nothing to do with the table content.
Sets or retrieves the table's layout algorithm.
--------------------------------------------------
The above can only solve the problem of IE. Here in FF we use the JS insertion method to solve the problem.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<style type="text/css">
<!--
div {
width:300px;
word-wrap:break-word;
border:1px solid red;
}
-->
</style>
<div id="ff">aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA>
/* <![CDATA[ */
function toBreakWord(intLen){
var obj=document.getElementById("ff");
var strContent=obj.innerHTML;
var strTemp="";
while(strContent.length>intLen){
strTemp+=strContent.substr(0,intLen)+"
";
strContent=strContent.substr(intLen,strContent.length);
}
strTemp+="
"+strContent;
obj.innerHTML=strTemp;
}
if(document.getElementById && !document.all) toBreakWord(37)
/* ]]> */
</script>