2008-10-23 119 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