用CSS使长串英文字符自动换行
来源:互联网 发布:淘宝店铺活动玩法 编辑:程序博客网 时间:2024/06/10 03:27
在一个单元格内,中文字符如果超出了单元格的宽度,都会自动换行。但奇怪的是,如果全是英文的话,不论你将TD的宽度设为多大,英文字符都不会自动换行,只会一直延伸。如果做英文站点,动态输出内容,这个就麻烦了。
幸好有个简单的办法可以解决:就是用CSS。只需用到:word-break:break-all就可以了。
例如:
<table style="table-layout:fixed">
<tr>
<td width="100" style="word-break:break-all">Mistletoe also known throughout history as the golden bough has several different legends associated with its beginning and its meaning.
Starting back as far as the Celtic Druids you can find more than one story concerning the mystical mistletoe. One such story is their belief that the plant held the soul of the host tree, which was the “holy oak”. During a ceremony, the Druid priests would harvest the mistletoe with a golden sickle to ensure the mistletoe never touched the ground, as it would lose its magical powers. The powers would quickly be absorbed back into the earth. Once the mistletoe was harvested, the priests would have the branches out to the people for them to use against all kinds of evils.
In England, mistletoe at one time was placed over the doorways for good luck. They believed that only happiness could pass underneath the mistletoe, therefore, enemies would hug and seal their peaceful intentions with a kiss of friendship.
all by <a href=http://www.qpsh.com>www.qpsh.com</a>
The ancient Norse people have a wonderful legend centered on the mistletoe. In their legend, the god Odin and his wife Frigga had a son by the name of Balder. Frigga loved her son very dearly. She took steps to ensure that nothing would ever harm him by way of earth, fire, water, or air.
The mistletoe did not fit into any of these categories, so an evil spirit by the name of Loki created an arrow out of mistletoe and gave it to Balder’s brother, Holder. Holder was blind and Loki held onto his hand and shot Balder in the heart with the mistletoe arrow. Balder died.
From this moment on, the legend is told differently in various stories. One is that Balder is brought to life. In another one, he had a Viking’s funeral and was sent to the Otherworld on a burning ship. He was to remain there until it was time for him to come back to earth to start a new era.
From that day, forward, Frigga stated the mistletoe would never harm anyone again and made it a symbol of love and made the promise to bestow a kiss upon everyone who passed beneath it.
</td>
</tr>
</table>
幸好有个简单的办法可以解决:就是用CSS。只需用到:word-break:break-all就可以了。
例如:
<table style="table-layout:fixed">
<tr>
<td width="100" style="word-break:break-all">Mistletoe also known throughout history as the golden bough has several different legends associated with its beginning and its meaning.
Starting back as far as the Celtic Druids you can find more than one story concerning the mystical mistletoe. One such story is their belief that the plant held the soul of the host tree, which was the “holy oak”. During a ceremony, the Druid priests would harvest the mistletoe with a golden sickle to ensure the mistletoe never touched the ground, as it would lose its magical powers. The powers would quickly be absorbed back into the earth. Once the mistletoe was harvested, the priests would have the branches out to the people for them to use against all kinds of evils.
In England, mistletoe at one time was placed over the doorways for good luck. They believed that only happiness could pass underneath the mistletoe, therefore, enemies would hug and seal their peaceful intentions with a kiss of friendship.
all by <a href=http://www.qpsh.com>www.qpsh.com</a>
The ancient Norse people have a wonderful legend centered on the mistletoe. In their legend, the god Odin and his wife Frigga had a son by the name of Balder. Frigga loved her son very dearly. She took steps to ensure that nothing would ever harm him by way of earth, fire, water, or air.
The mistletoe did not fit into any of these categories, so an evil spirit by the name of Loki created an arrow out of mistletoe and gave it to Balder’s brother, Holder. Holder was blind and Loki held onto his hand and shot Balder in the heart with the mistletoe arrow. Balder died.
From this moment on, the legend is told differently in various stories. One is that Balder is brought to life. In another one, he had a Viking’s funeral and was sent to the Otherworld on a burning ship. He was to remain there until it was time for him to come back to earth to start a new era.
From that day, forward, Frigga stated the mistletoe would never harm anyone again and made it a symbol of love and made the promise to bestow a kiss upon everyone who passed beneath it.
</td>
</tr>
</table>
0 0
- 用CSS使长串英文字符自动换行
- css解决英文字符与阿伯数字自动换行
- 用CSS实现英文长字符串自动换行(CSS)
- js实现连续英文字符自动换行
- 使用css让英文文本自动换行
- CSS解决英文自动换行问题
- CSS实现纯英文数字自动换行
- 使英文字符自动换行/在恰当的位置换行
- 英文字符自动换行(防止表格撑坏)方法
- 自动换行问题,而连续的数字和英文字符常常将容器撑大,下面介绍的是CSS如何实现换行的方法
- 英文网站单词长自动换行 css样式
- CSS实现连续数字和英文的自动换行
- CSS实现连续数字和英文的自动换行
- 英文自动换行
- 英文字符和汉字自动换行和不换行的设置
- 英文字符和汉字自动换行和不换行的设置(个人收藏)
- 英文字符和汉字自动换行和不换行的设置
- table 英文字符不换行
- 网页不能播放flash的解决方法
- 常见的无法上网故障原因和解决方法
- Instant Source注册码
- 抓取整个网页的图像捕捉工具:Web2Pic Pro
- 利用Ant脚本生成war包的详细步骤
- 用CSS使长串英文字符自动换行
- 学习
- 用pelace()函数替换空格和换行
- flash跑马灯中,鼠标指向时的停止效果
- AndroidWear官方文档总结06 - 支持语音输入的通知
- DW中出现:以下翻译器没有被装载,有不正确的设置信息 问题的解决方案
- 网站上增加天气预报的方法
- 转载-Oracle拆分字符串,字符串分割的函数
- javascript实现的图片滚动效果,鼠标放上可停止