2008-10-23 120 views

回答

2

我相信你不得不使用的圖像。可以在設計時創建,也可以在運行時使用HttpHandler生成圖像,如果它們需要動態的話。使所有的字段都使用TemplateFields並將圖像放在HeaderTemplate中。有點乏味,但這是我能想到的唯一方式。也許有些第三方網格控件可以處理這個問題。

2

Silverlight可以做到這一點(如能閃光,我敢肯定)。 CSS3將支持它。但圖形文字是現在的方式。

您可以使用任何一種文本隱藏技術在CSS中顯示訪問瀏覽器的文本,但顯示圖形(文字垂直排列)爲視力正常的用戶。

1

Stu Nicholls有一個有趣的HTML/CSS技術,如果有點冗長的HTML。但是,它不會執行您要查找的單詞輪換。只是拋出另一種選擇。

1

如果你不介意的IE唯一的解決方案,你可以使用一些IE支持CSS過濾器。事情是這樣的:

<div style="width:100%; filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);"> 
    This text is rotated 90 degrees. 
</div> 
2

我使用下面的CSS做了IE儘管它可能僅限於瀏覽器,版本等..

寫作模式:TB-RL; 過濾:flipv fliph

+0

我在聯網系統中使用此之間,它似乎總是工作。 – Kezzer 2008-12-24 12:27:05

1

在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

0

我用了一個 休息(BR)命令每個字母

0
/*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(); 
     } 
+0

歡迎來到計算器!請提供上述代碼的簡短說明以提高帖子的準確性:) – 2012-10-20 13:38:07