垂直顯示
回答
我相信你不得不使用的圖像。可以在設計時創建,也可以在運行時使用HttpHandler生成圖像,如果它們需要動態的話。使所有的字段都使用TemplateFields並將圖像放在HeaderTemplate中。有點乏味,但這是我能想到的唯一方式。也許有些第三方網格控件可以處理這個問題。
Silverlight可以做到這一點(如能閃光,我敢肯定)。 CSS3將支持它。但圖形文字是現在的方式。
您可以使用任何一種文本隱藏技術在CSS中顯示訪問瀏覽器的文本,但顯示圖形(文字垂直排列)爲視力正常的用戶。
Stu Nicholls有一個有趣的HTML/CSS技術,如果有點冗長的HTML。但是,它不會執行您要查找的單詞輪換。只是拋出另一種選擇。
如果你不介意的IE唯一的解決方案,你可以使用一些IE支持CSS過濾器。事情是這樣的:
<div style="width:100%; filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);">
This text is rotated 90 degrees.
</div>
我使用下面的CSS做了IE儘管它可能僅限於瀏覽器,版本等..
寫作模式:TB-RL; 過濾:flipv fliph
在IE7 +,你可以使用DX變換:
writing-mode: tb-rl;
filter: flipv fliph;
在舊IE(對可憐的靈魂還是堅持了下來):
filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
在Safari /鉻(基於webkit的任何東西)你可以使用變換:
-webkit-transform: rotate(270deg);
最新的FX版本有相當於:
-moz-transform: rotate(270deg);
但這還不是主流。
我一直在試圖與圖形文字要做到這一點,但有一個few problems。
我用了一個 休息(BR)命令每個字母
/*Do this in a loop for each header cell so Cells[0] to cells[however many] and however long the string is so use length properties to get the actual length of the text string */
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
StringBuilder vtxt = new StringBuilder();
vtxt.Append(GridView1.HeaderRow.Cells[0].Text.ToString().Substring(0,1));
vtxt.Append("<br />");
vtxt.Append(GridView1.HeaderRow.Cells[0].Text.ToString().Substring(1, 1));
vtxt.Append("<br />");
vtxt.Append(GridView1.HeaderRow.Cells[0].Text.ToString().Substring(2, 1));
vtxt.Append("<br />");
vtxt.Append(GridView1.HeaderRow.Cells[0].Text.ToString().Substring(3, 1));
vtxt.Append("<br />");
vtxt.Append(GridView1.HeaderRow.Cells[0].Text.ToString().Substring(4, 1));
vtxt.Append("<br />");
vtxt.Append(GridView1.HeaderRow.Cells[0].Text.ToString().Substring(5, 1));
vtxt.Append("<br />");
vtxt.Append(GridView1.HeaderRow.Cells[0].Text.ToString().Substring(6, 1));
vtxt.Append("<br />");
vtxt.Append(GridView1.HeaderRow.Cells[0].Text.ToString().Substring(7, 1));
GridView1.HeaderRow.Cells[2].Text = vtxt.ToString();
}
歡迎來到計算器!請提供上述代碼的簡短說明以提高帖子的準確性:) – 2012-10-20 13:38:07
- 1. 垂直ListView顯示
- 2. 顯示項目垂直
- 3. iPad - 顯示垂直分頁
- 4. 顯示錶格垂直
- 5. Mandelbrot集垂直顯示
- 6. 垂直顯示jpgraph列名
- 7. 垂直顯示列和行
- 8. 垂直直方圖顯示不正確
- 9. 在asp.net中以垂直方式顯示數據和垂直顯示
- 10. C#WPF垂直列表框不顯示垂直滾動條
- 11. 在oracle中垂直顯示結果
- 12. 始終顯示iframe垂直滾動條
- 13. 顯示照片垂直對齊
- 14. ListBox垂直滾動條不顯示(WPF)
- 15. ChartJS - 底部的標籤顯示垂直
- 16. 使用XDrawString垂直顯示文本
- 17. AndroidPlot - 顯示垂直域標籤
- 18. 顯示橫排垂直的SQL Server 2005
- 19. 垂直文本顯示在表TD中?
- 20. 列表視圖,垂直顯示文本
- 21. 如何顯示垂直而非水平
- 22. 用divider垂直顯示錶格列android
- 23. 顯示圖像懸停(垂直居中)
- 24. 在div上垂直顯示文字
- 25. 最大值:顯示列表垂直
- 26. 垂直滾動條顯示不正確
- 27. 如何寫/垂直顯示文字?
- 28. 身高100%顯示垂直滾動條
- 29. 垂直格式的顯示號碼
- 30. 在交叉點上顯示垂直線
我在聯網系統中使用此之間,它似乎總是工作。 – Kezzer 2008-12-24 12:27:05