惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Threatpost
V
Vulnerabilities – Threatpost
TaoSecurity Blog
TaoSecurity Blog
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed
G
GRAHAM CLULEY
S
Securelist
P
Palo Alto Networks Blog
MongoDB | Blog
MongoDB | Blog
A
Arctic Wolf
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
WordPress大学
WordPress大学
Project Zero
Project Zero
T
Threat Research - Cisco Blogs
L
Lohrmann on Cybersecurity
C
Cyber Attacks, Cyber Crime and Cyber Security
F
Fortinet All Blogs
博客园 - 叶小钗
B
Blog RSS Feed
C
Cisco Blogs
Google DeepMind News
Google DeepMind News
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Apple Machine Learning Research
Apple Machine Learning Research
G
Google Developers Blog
K
Kaspersky official blog
D
Docker
Latest news
Latest news
Cisco Talos Blog
Cisco Talos Blog
T
Tor Project blog
Cyberwarzone
Cyberwarzone
Security Latest
Security Latest
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Spread Privacy
Spread Privacy
Microsoft Azure Blog
Microsoft Azure Blog
C
Check Point Blog
J
Java Code Geeks
Simon Willison's Weblog
Simon Willison's Weblog
T
Tenable Blog
Recent Announcements
Recent Announcements
T
Tailwind CSS Blog
H
Help Net Security
L
LINUX DO - 热门话题
T
The Exploit Database - CXSecurity.com
Jina AI
Jina AI
S
SegmentFault 最新的问题
MyScale Blog
MyScale Blog
NISL@THU
NISL@THU
美团技术团队
腾讯CDC

博客园 - 天下

[转]开始PFC之旅行 查询同一表内多字段同时重复记录的SQL语句 数据库设计中的14个关键技巧收藏[转] 走出海量数据及访问量压力困境收藏[转] 大型网站架构设计[转] (转)各主要数据库的连接串 - 天下 - 博客园 SQL Anywhere 10 关于 COMMIT 掉数据的问题 - 天下 vs2005水晶报表页面打开数据库登录框提示取消方法[转] .net2.0 +asa 10 连接程序 PD12.5 生成 PB 中table的扩展属性 - 天下 Asp.net2.0回发或回调参数无效问题的解决 Report Service 为用户“NT AUTHORITY、NETWORK SERVICE”授予的权限不足,无法进行此操作。(rsAccessDenied)处理 [转]SQL Server一些常见性能问题的总结 SQL SERVER 添加序号列 sharepoint Site Data Web 服务中的错误。 (0x80042616)PortalCrawl Web 服务中的错误。 (0x80042617)处理 TFS的TF31004:错误 创建WebPart时的数据库连接问题。 Visual Studio 2005 Team Foundation Server Trial Edition下载 Team Foundation Server架设之删除项目
datagrid格式变乱解决方案---------------网页内强制折行与不折行的解决方案
天下 · 2007-11-27 · via 博客园 - 天下

最近在使用datagrid的时候,表格内的字符常常把表格格式变的很乱,常常因为一个格子里面的字符多了,把整个格子变乱完
目前的解决办法是
    protected void Page_Load(object sender, EventArgs e)
    {
        增加----this.SDG_ChangeWork.Attributes.Add("style", "word-break:break-all;word-wrap:break-word");

    }

自动换行word-break:break-all和word-wrap:break-word的区别

word-break:break-all和word-wrap:break-word都是能使其容器如DIV的内容自动换行。
它们的区别就在于:

1,word-break:break-all 例如div宽200px,它的内容就会到200px自动换行,如果该行末端有个英文单词很长(congratulation等),它会把单词截断,变成该行末端为conra(congratulation的前端部分),下一行为tulation(conguatulation)的后端部分了。

2,word-wrap:break-word 例子与上面一样,但区别就是它会把congratulation整个单词看成一个整体,如果该行末端宽度不够显示整个单词,它会自动把整个单词放到下一行,而不会把单词截断掉的。

如果不增加js可以参考如下:
在其它浏览器中要实现文字自动强制折行功能,代码如下。http://www.blooberry.com/indexdot/css/properties/text/whitespace.htm
http://myy.helia.fi/~karte/pre-wrap-css3-mozilla-opera-ie.html

pre{
white-space: pre; /* CSS2 */
white-space: -moz-pre-wrap; /* Mozilla */
white-space: -hp-pre-wrap; /* HP printers */
white-space: -o-pre-wrap; /* Opera 7 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: pre-wrap; /* CSS 2.1 */
white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */
word-wrap: break-word; /* IE */

}
word-wrap和white-space都可以控制,但对IE5就不起作用了。
在IE5下面控制元素折行应该使用这个 word-break : normal | break-all | keep-all
<br>
<br>
强制不折行
对于table来讲,给td增加nowrap就行。xhtml写法是nowrap="nowrap";
用style="white-space:nowrap;"同样可以强制不折行。或者用<nobr>来包括不允许折行的内容。<hr>
<div  style="width:200px;height:50px;white-space:nowrap;">
强制不折行强 制fasdf不折 行强制不折行强制fasf不 折行强制 不折行fasfsa强制不折行
</div>
<hr>
<br>
<div  style="width:200px;height:50px;">
<nobr>
强制不 折行fasd强制 不折行强制不fasdf折行强制不折行 强制不折行fasdf强制不折行
</nobr>
</div>
<br><br><hr>
<br>



有样式控制

fadsfdasfdasdgaggagadgagagagfadsfdasfdasdgaggagadgagagag 中国中国中国中国中国中国中国中国中国中国中国中国中国中国中国中国中国中国。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。

有样式控制word-break:break-all

fadsfdasfdasdgaggagadgagagagfadsfdasfdasdgaggagadgagagag 中国中国中国中国中国中国中国中国中国中国中国中国中国中国中国中国中国中国。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。

有样式控制word-break:break-all;word-wrap:break-word

fadsfdasfdasdgaggagadgagagagfadsfdasfdasdgaggagadgagagag 中国中国中国中国中国中国中国中国中国中国中国中国中国中国中国中国中国中国。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。

有样式控制word-break:break-all;word-wrap:break-word

fadsfdasfdasdgaggagadgagagagfadsfdasfdasdgaggagadgagagag 中国中国中国中国中国中国中国中国中国中国中国中国中国中国中国中国中国中国。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。


给table加样式 style="table-layout:fixed;width:300px;color:red;background-color:#cecece;word-break:break-all;word-wrap:break-word"

fadsfdasfdasdgaggagadgagagagfadsfdasfdasdgaggagadgagagag 中国中国中国中国中国中国中国中国中国中国中国中国中国中国中国中国中国中国。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。

给td加样式 style="table-layout:fixed;width:300px;color:red;background-color:#cecece;word-break:break-all;word-wrap:break-word"

fadsfdasfdasdgaggagadgagagagfadsfdasfdasdgaggagadgagagag 中国中国中国中国中国中国中国中国中国中国中国中国中国中国中国中国中国中国。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。

转载:http://blog.csdn.net/xworld99/archive/2005/11/23/535884.aspx


css之自动换行

大家都知道连续的英文或数字能是容器被撑大,不能根据容器的大小自动换行,下面是 CSS如何将他们换行的方法!
对于div
1.(IE浏览器)white-space:normal; word-break:break-all;这里前者是遵循标准。
       #wrap{white-space:normal; width:200px; }
或者
       #wrap{word-break:break-all;width:200px;}
<div id="wrap">ddd1111111111111111111111111111111111</div>
效果:可以实现换行
2.(Firefox浏览器)white-space:normal; word-break:break-all;overflow:hidden;同样的FF下也没有很好的实现方法,只能隐藏或者加滚动条,当然不加滚动条效果更好!
       #wrap{white-space:normal; width:200px; overflow:auto;}
或者
       #wrap{word-break:break-all;width:200px; overflow:auto; }
       <div id="wrap">ddd1111111111111111111111111111111111111111</div>
效果:容器正常,内容隐藏
对于table
1. (IE浏览器)使用样式table-layout:fixed;
       <style>
       .tb{table-layout:fixed}
       </style>
       <table class="tbl" width="80">
       <tr>
       <td>abcdefghigklmnopqrstuvwxyz 1234567890
       </td>
       </tr>
       </table>
效果:可以换行
2.(IE浏览器)使用样式table-layout:fixed与nowrap
       <style>
       .tb {table-layout:fixed}
       </style>
       <table class="tb" width="80">
       <tr>
       <td nowrap>abcdefghigklmnopqrstuvwxyz 1234567890
       </td>
       </tr>
       </table>
效果:可以换行
3. (IE浏览器)在使用百分比固定td大小情况下使用样式table-layout:fixed与nowrap
       <style>
       .tb{table-layout:fixed}
       </style>
       <table class="tb" width=80>
       <tr>
       <td width=25% nowrap>abcdefghigklmnopqrstuvwxyz 1234567890
       </td>
       <td nowrap>abcdefghigklmnopqrstuvwxyz 1234567890
       </td>
       </tr>
       </table>
效果:两个td均正常换行
3.(Firefox浏览器)在使用百分比固定td大小情况下使用样式table-layout:fixed与nowrap,并且使用div
       <style>
       .tb {table-layout:fixed}
       .td {overflow:hidden;}
       </style>
       <table class=tb width=80>
       <tr>
       <td width=25% class=td nowrap>
       <div>abcdefghigklmnopqrstuvwxyz 1234567890</div>
       </td>
       <td class=td nowrap>
       <div>abcdefghigklmnopqrstuvwxyz 1234567890</div>
       </td>
       </tr>
       </table>
这里单元格宽度一定要用百分比定义
效果:正常显示,但不能换行(注:在FF下还没有能使容器内容换行的好方法,只能用overflow将多出的内容隐藏,以免影响整体效果)