??xml version="1.0" encoding="utf-8" standalone="yes"?> <TABLE style="table-layout: auto | fixed"> 使用:style="word-break : break-all;" 对于在英文中使用,请用style="table-layout:fixed; word-wrap:break-word" ============================================================================== word-wrap同word-break的区?/span> word-wrap: word-break: ȝ如下Q?br />
word-wrap是控制换行的?br />
使用break-wordӞ是将强制换行。中文没有Q何问题,英文语句也没问题。但是对于长串的英文Q就不v作用?/span> break-word是控制是否断词的?br />
normal是默认情况,英文单词不被拆开?br />
break-allQ是断开单词。在单词到边界时Q下个字母自动到下一行。主要解决了长串英文的问题?br />
keep-allQ是指Chinese, Japanese, and Korean不断词。即只用此时Q不用word-wrapQ中文就不会换行了。(英文语句正常。) ff下: 目前主要的问题存在于 长串英文 ?英文单词被断开。其实长串英文就是一个比较长的单词而已?br />
卌文单词应不应该被断开那?那问题很明显了,昄不应该被断开了?br />
对于长串英文Q就是恶意的东西Q自然不用去了。但是,也要想些办法Q不让它把容器撑大?br />
用:overflow:auto; ie下,长串会自动折行。ff下,长串会被遮盖?/p>
另,试代码如下Q?/p>
1.htm=================================================================== <style> .c1{ width:300px; border:1px solid red} <br> <br> <br> <br> <br> <br> ȝ了一下,只要在CSS中定义了如下句子Q可保网不会再被撑开了?/p>
自动换行问题,正常字符的换行是比较合理?而连l的数字和英文字W常常将容器撑大,人头?下面介绍的是CSS如何实现换行的方?/p>
对于div,p{块U元?/p>
正常文字的换?亚洲文字和非亚洲文字)元素拥有默认的white-space:normal,当定义的宽度之后自动换行 html IE览?/p>
q箋的英文字W和阿拉伯数?使用word-wrap: break-word ;或者word-break:break-all;实现强制断行 html css Firefox览?br />
q箋的英文字W和阿拉伯数字的断行,Firefox的所有版本的没有解决q个问题,我们只有让超界的字符隐藏或?l容器添加滚动条 html css 对于table元素 Firefox览?/p>
1. 使用 table-layout:fixed;强制table的宽?内层td,th采用word-break : break-all;或者word-wrap : break-word ;换行Q用overflow:hidden;隐藏出内,q里overflow:auto;无法起作?lt;table style="table-layout:fixed" width="200"><tr> <td width="25%" style="word-break : break-all; overflow:hidden; ">abcdefghigklmnopqrstuvwxyz1234567890</td> <td width="75%" style="word-wrap : break-word; overflow:hidden; ">abcdefghigklmnopqrstuvwxyz1234567890</td> </tr></table> 最佳CSS定义换行代码.wrap { table-layout:fixed; word-break: break-all; overflow:hidden; } 1)、sigkeyZ人鉴权keyQ请勿修改,否则无法发v临时会话?/p>
2)、时会话图?lt;img border="0" SRC='http://wpa.qq.com/pa?p=1:80000805:1' alt="点击q里l我发消?> SRC是图标链接,自定义图标中可以替换q一部分己图片的链接Q?/p>
参数Q?/p>
P=以冒?#8220;:”分隔多个参数 W一个参Cؓ版本P目前?Q?/p>
W二个ؓQQ/TMLQ?/p>
W三个参Cؓ囑փ风格Q支持多U状态?/p>
alt是图标旁留言?/p>
3)、除了自定义图标需要修改时会话图标外Q其他情况下不要修改代码Q因为有可能D在不同的环境和浏览器下,无法发v临时会话?/p>
自定义在UK格图?/p>
用JS实现Q具体步骤如下: 1) 甌代码 2) 定义online数组Q必Lonline命名 <script>var online= new Array();</script>
3) 获取在线状?/p>
<script src="http://webpresence.qq.com/getonline?Type=1&80000805:"></script> 可以获取多个Q必M冒号分隔Q以冒号l尾Q比? <script src="http://webpresence.qq.com/getonline?Type=1&80000805:10000:123456:"></script> online[0]=0,表示80000805ȝ online[1]=1,表示10000在线 online[2]=1,表示123456在线 填写L的先后顺序,分别对应数组online??? 4) d代码 把SRC='http://wpa.qq.com/pa?p=1:80000805:1'替换q囄Q比?
]]>
auto: 默认?br />
fixed: 宽度固定,截断出的内?br />
<TABLE style="word-break: normal | break-all | keep-all">
normal: 默认?按字词截断换?br />
break-all: 截断q换?br />
keep-all: 不截断不换行
使用:style="table-layout:fixed;"
表示输出停止,停留在设定的长度?
表示对超镉K?换行再l显C?
推荐使用word-wrap:break-word;word-break:break-all;table-layout:fixed;
normal Default. Content exceeds the boundaries of its container.
break-word Content wraps to next line, and a word-break occurs when necessary. 必要时会触发word-break?/p>
normal Default. Allows line breaking within words. 好像是只对Asian text起作用?br />
break-all Behaves the same as normal for Asian text, yet allows the line to break arbitrarily for non-Asian text. This value is suited to Asian text that contains some excerpts of non-Asian text.
keep-all Does not allow word breaking for Chinese, Japanese, and Korean. Functions the same way as normal for all non-Asian languages. This value is optimized for text that includes small amounts of Chinese, Japanese, or Korean.
ie下:
使用word-wrap:break-word;所有的都正常?/p>
如这2个都不用的话Q中文不会出M问题。英文语句也不会出问题。但是,长串英文会出问题?br />
Z解决长串英文Q一般用word-wrap:break-word;word-break:break-all;。但是,此方式会DQ普通的英文语句中的单词会被断开Qie下也是)?/p>
所以,lgQ?span style="line-height: 21px; color: #ff0000; ">最好的方式是word-wrap:break-word;overflow:hidden;而不是word-wrap:break-word;word-break:break-all;?br />
word-wrap:break-word;overflow:auto;在ie下没有Q何问题。在ff下,长串会被遮住部分内容?/span>
.c1{ width:300px; border:1px solid red}
.c2{ width:300px;word-wrap:break-word; border:1px solid yellow}
.c3{ width:300px;word-wrap:break-word;word-break:break-all; border:1px solid green}
.c4{ width:300px;word-wrap:break-word;word-break:keep-all; border:1px solid blue}
.c5{ width:300px;word-break:break-all; border:1px solid black}
.c6{ width:300px;word-break:keep-all; border:1px solid red}
.c7{ width:300px;word-wrap:break-word;overflow:auto; border:1px solid yellow}
</style>
<div class="c1">
safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
</div>
<div class=c1>
This is all English. This is all English. This is all English.
</div>
<div class=c1>
全是中文的情c全是中文的情况。全是中文的情况?br />
</div>
<div class=c1>
中英文排的情况。Chinese and English. 中英文排的情况。Chinese and English.
</div>
.c2{ width:300px;word-wrap:break-word; border:1px solid yellow}
<div class="c2">
safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
</div>
<div class=c2>
This is all English. This is all English. This is all English.
</div>
<div class=c2>
全是中文的情c全是中文的情况。全是中文的情况?br />
</div>
<div class=c2>
中英文排的情况。Chinese and English. 中英文排的情况。Chinese and English.
</div>
.c3{ width:300px;word-wrap:break-word;word-break:break-all; border:1px solid green}
<div class="c3">
safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
</div>
<div class=c3>
This is all English. This is all English. This is all English.
</div>
<div class=c3>
全是中文的情c全是中文的情况。全是中文的情况?br />
</div>
<div class=c3>
中英文排的情况。Chinese and English. 中英文排的情况。Chinese and English.
</div>
.c4{ width:300px;word-wrap:break-word;word-break:keep-all; border:1px solid blue}
<div class="c4">
safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
</div>
<div class=c4>
This is all English. This is all English. This is all English.
</div>
<div class=c4>
全是中文的情c全是中文的情况。全是中文的情况?br />
</div>
<div class=c4>
中英文排的情况。Chinese and English. 中英文排的情况。Chinese and English.
</div>
.c5{ width:300px;word-break:break-all; border:1px solid black}
<div class="c5">
safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
</div>
<div class=c5>
This is all English. This is all English. This is all English.
</div>
<div class=c5>
全是中文的情c全是中文的情况。全是中文的情况?br />
</div>
<div class=c5>
中英文排的情况。Chinese and English. 中英文排的情况。Chinese and English.
</div>
.c6{ width:300px;word-break:keep-all; border:1px solid red}
<div class="c6">
safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
</div>
<div class=c6>
This is all English. This is all English. This is all English.
</div>
<div class=c6>
全是中文的情c全是中文的情况。全是中文的情况?br />
</div>
<div class=c6>
中英文排的情况。Chinese and English. 中英文排的情况。Chinese and English.
</div>
.c7{ width:300px;word-wrap:break-word;overflow:auto; border:1px solid yellow}
<div class="c7">
safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
</div>
<div class=c7>
This is all English. This is all English. This is all English.
</div>
<div class=c7>
全是中文的情c全是中文的情况。全是中文的情况?br />
</div>
<div class=c7>
中英文排的情况。Chinese and English. 中英文排的情况。Chinese and English.
</div>
]]>
2 import java.util.Scanner;
3 public class SortTest {
4 public static void main(String[] args) throws IOException {
5 int temp = 0;//临时变量Q用于冒泡交?nbsp;
6 int[] num=new int[10]; //声明一个空的数l?nbsp; 10个长?/span>
7 Scanner sc = new Scanner(System.in);
8 FileOutputStream out=new FileOutputStream("1.txt");
9 PrintStream p=new PrintStream(out);
10 //开始@环赋?/span>
11 for(int i =0;i<num.length;i++){
12 num[i]=sc.nextInt();
13 }
14 p.append("排序前ؓ:");
15 for (int i = 0; i <num.length; i++) {
16 System.out.println(num[i]);
17 p.append(num[i]+" , ");
18 }
19 // 用于排序
20 for (int i = 0; i < num.length-1; i++) {
21 for (int j = 0; j < num.length - i - 1; j++) {
22 if (num[j] > num[j + 1]) {
23 temp = num[j];
24 num[j] = num[j + 1];
25 num[j + 1] = temp;
26 }
27 }
28 }
29 //输出文g
30 p.append("\n");
31 p.append("排序后ؓ:");
32 // 循环输出
33 System.out.println("排序后ؓ:");
34 for (int i = 0; i <num.length; i++) {
35 System.out.println(num[i]);
36 p.append(num[i]+" , ");
37 }
38
39
40 }
41 }
最后应该把plclose了哈
]]>
table不能换行问题 一般是Q一行里面全是数字或是字母或者结有多个感叹可导?table不能换行Q中文默认的会自动换行的Q字母不能换行问题:
style="table-layout:fixed; word-break: break-all; overflow:hidden;"
复制代码在单元格属性里加入上面q句Q如Q?br />
<td style="table-layout:fixed; word-break: break-all; overflow:hidden;">
复制代码用表格做|页排版的时候,一般都能正怋用。偏偏有时会到一D连l的英文词或者一堆感叹号(!!!)把网就撑开的现象?/p>
<div id="wrap">正常文字的换?亚洲文字和非亚洲文字)元素拥有默认的white-space:normal,当定?lt;/div>
css
#wrap{white-space:normal; width:200px; }
<div id="wrap">abcdefghijklmnabcdefghijklmnabcdefghijklmn111111111</div>
#wrap{word-break:break-all; width:200px;}
或?
#wrap{word-wrap:break-word; width:200px;}
<div id="wrap">abcdefghijklmnabcdefghijklmnabcdefghijklmn111111111</div>
#wrap{word-break:break-all; width:200px; overflow:auto;}
IE览?br />
1. 使用 table-layout:fixed;强制table的宽?多余内容隐藏<table style="table-layout:fixed" width="200"><tr><td>abcdefghigklmnopqrstuvwxyz1234567890ssssssssssssss</td></tr></table>
复制代码2. 使用 table-layout:fixed;强制table的宽?内层td,th采用word-break : break-all;或者word-wrap : break-word ;换行 <table width="200" style="table-layout:fixed;"><tr><td width="25%" style="word-break : break-all; ">abcdefghigklmnopqrstuvwxyz 1234567890</td><td style="word-wrap : break-word ;">abcdefghigklmnopqrstuvwxyz 1234567890</td></tr></table>
复制代码3.在td,th中嵌套div,p{采用上面提到的div,p的换行方?/p>
复制代码2.在td,th中嵌套div,p{采用上面提到的对付Firefox的方法?/p>
复制代码当然Q这U现象出现的几率很小Q但是不能排除网友的恶搞?
]]>
<a href="http://sighttp.qq.com/cgi-bin/check?sigkey=81a37f0b7cac68639bddfdb9b93a6c92bc211f3e3a4e683afbb31a079382dc9d";target=_blank; onclick="var tempSrc='http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=81a37f0b7cac68639bddfdb9b93a6c92bc211f3e3a4e683afbb31a079382dc9d';var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;"><img border="0" SRC='http://wpa.qq.com/pa?p=1:80000805:1' alt="点击q里l我发消?></a>
else document.write("<a href="http://sighttp.qq.com/cgi-bin/check?sigkey=81a37f0b7cac68639bddfdb9b93a6c92bc211f3e3a4e683afbb31a079382dc9d"; target=_blank; onclick="var tempSrc='http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=81a37f0b7cac68639bddfdb9b93a6c92bc211f3e3a4e683afbb31a079382dc9d';var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;"><img border="0" SRC='http://xxxx/online.jpg' alt="点击q里l我发消?></a>"); </script>
我是q样看的Q用tx的方法得到某QQh否在U,用js判断Q显Conline.jpg或者outline.jpgq两个图片,其余不变?img src ="http://www.aygfsteel.com/chenglu/aggbug/324381.html" width = "1" height = "1" />
]]>
Spring的applicationContext.xml文g