不换行: word-break:keep-all;word-wrap:normal 2、换行: word-break:break-all;word-wrap:break-word 以上的换行只支持英文,当标题中包含有中文时并不好用。 3、如果标题中含有中文的,只能在GridView的RowDataBound事件中添加代码,如下: if (e.Row.RowType == DataControlRowType.Header) { e.Row.Cells[0].Text = "<nobr>操作用户</nobr>"; e.Row.Cells[1].Text = "<nobr>批次名称</nobr>"; e.Row.Cells[2].Text = "<nobr>文件名称</nobr>"; e.Row.Cells[3].Text = "<nobr>档案类型</nobr>"; e.Row.Cells[4].Text = "<nobr>字段名称</nobr>"; <script></script>
asp.net 标题不让换行
最新推荐文章于 2019-08-20 17:06:00 发布