日期:2014-05-19  浏览次数:21018 次

如何使Label的文字逆时针横过来90度显示?
Label显示英文(不是中文,用@字体不行),比如“China”,我想把它逆时针90度显示,怎么做?  



------解决方案--------------------
是不是竖着放 ?
把label的 autosize关闭掉 ,然后设定label的size 宽就是小于2个字符的大于一个字符 长就字符的长度*系数.

------解决方案--------------------
CSS中最接近你想要的是style.writingMode属性:
http://msdn.microsoft.com/workshop/samples/author/dhtml/refs/writingMode.htm
但跟你想的还太远。其实想用CSS来实现旋转任意角度是不太可能的,你可以试试DirectAnimation控件或VML或SVG来实现

------解决方案--------------------
<%@ Page language= "c# " Codebehind= "WebForm1.aspx.cs " AutoEventWireup= "false " Inherits= "WebTest.WebForm1 " %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN " >
<HTML>
<HEAD>
<title> WebForm1 </title>
<meta name= "GENERATOR " Content= "Microsoft Visual Studio .NET 7.1 ">
<meta name= "CODE_LANGUAGE " Content= "C# ">
<meta name= "vs_defaultClientScript " content= "JavaScript ">
<meta name= "vs_targetSchema " content= "http://schemas.microsoft.com/intellisense/ie5 ">
<style>
.webfx { WRITING-MODE: tb-rl }
</style>
</HEAD>
<body>
<form id= "Form1 " method= "post " runat= "server ">
<asp:Label id= "Label1 " CssClass=webfx runat= "server "> Label </asp:Label>
</form>
</body>
</HTML>
------解决方案--------------------
把头转过90度,一切ok!
------解决方案--------------------
win or web ??

------解决方案--------------------
把label的 autosize关闭掉 ,然后设定label的size 宽就是小于2个字符的大于一个字符 长就字符的长度*系数.
这也是一种方法