<html dir="rtl">
<head>
<title>【孟宪会之精彩世界】</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {  font-family: "宋体"; font-size: 12pt; color: #000099}
td {  font-size: 9pt}
.texian {  line-height: 20pt; color: #349800; font-weight: bold}
xmp {  font-family: "Arial", "Helvetica", "sans-serif"; font-size: 12pt}
-->
</style>
<script for="document" event="oncontextmenu">
return false;
</script>
<script for="document" event="ondrag">
return false;

</script><script for="document" event="onkeypress">    if(event.keyCode == 32) {    }
    else if((event.keyCode >= 65 && event.keyCode <= 90) || (event.keyCode >= 97 && event.keyCode <= 122))
    {
}
</script>
<script language="JavaScript">
self.moveTo(-4,-4)
</script></HEAD> 
<BODY bgcolor="#ffffdo" onload="document.all.test.style.writingMode = 'tb-rl'">
<div dir="ltr">
<div align="center"><b>怎样使文字旋转</b> <br>
  <br>
  <table width="640" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td> 
        <p>IE5.5的新功能:旋转文字,看一下你就明白了。用法如下:<br>
          获取书写方式: <br>
          <span class="texian">object.style.writingMode</span> <br>
          设置书写方式: <br>
          <span class="texian">object.style.writingMode = sFlowDir</span> <br>
          其中 <span class="texian">sFlowDir</span> 是<span class="texian">lr-tb</span>或者<span class="texian">tb-rl 
          </span> 之一</p>
        <table width="320" border="1" cellspacing="0" cellpadding="0" bordercolor="#FF6699" bordercolorlight="#FF6699" bordercolordark="#FF6699">
          <tr> 
            <td width="100"><b>设定值</b></td>
            <td width="220"><b>效果</b></td>
          </tr>
          <tr> 
            <td>lr-tb</td>
            <td>默认的对象方向,即从左到右,从上到下的顺序</td>
          </tr>
          <tr>
            <td>tb-rl</td>
            <td>对象的排列方式为从上到下,从右向左排列。中文文字方向朝上,英文文字顺时针旋转90度。</td>
          </tr>
        </table><SCRIPT language=JavaScript>
document.onclick = rotate;function rotate() {
  if (test.style.writingMode == "lr-tb") {
    test.style.writingMode = "tb-rl";
  }
  else {
    test.style.writingMode = "lr-tb";
  }
}
</SCRIPT>
        <br>
        例子如下:[请点击鼠标]<br> <br><DIV id=test style="POSITION: relative;">8月14日,俄罗斯国防部宣布了一条震惊全世界的消息:一艘参加军事演习的俄海军“奥斯卡”级万吨战略核潜艇“库尔斯克”号因机械故障沉没在巴伦支海,舰上100多名官兵被困。
  <p>  由于海上风暴以及能见度过低,救援舱未能与被困潜艇接驳,在俄海军连续几次潜艇救援行动均告失败后,俄罗斯国防部官员终于正式请求英国和挪威协助拯救核潜艇上的被困官兵。英国则立即派出一架载有一艘小型救援潜艇的飞机飞抵挪威,17日同挪威救援队伍一起奔赴巴伦支海参加救援行动。</p>
  <p>  北京时间8月21日18时消息:挪威潜水员已经进入潜艇内部进行了初步搜寻,潜艇中充斥着海水。救援人员断定:船员已全部遇难。</p>
</DIV>
<br><br>
        代码如下: <br>
        &lt;div id=test style=&quot;POSITION: relative&quot;&gt;8月14日,俄罗斯国防部……船员已全部遇难。&lt;/div&gt; 
        <br>
          &lt;SCRIPT language=JavaScript&gt;<br>
        document.onclick = rotate; function rotate() {<br>
        if (test.style.writingMode == &quot;lr-tb&quot;) {<br>
        test.style.writingMode = &quot;tb-rl&quot;;<br>
        }<br>
        else {<br>
        test.style.writingMode = &quot;lr-tb&quot;;<br>
        }<br>
        }<br>
        &lt;/SCRIPT&gt;</td>
    </tr>
  </table>
</div>
</div></body></html>

解决方案 »

  1.   

    make it an image and use Microsoft's DHTML filter, or rotate your monitor 90 degrees
      

  2.   

    ie5.0怎么没反应,
    是不是IE版本的问题
      

  3.   

    但是我要把文字放在TD里,我想把文字包括TD一起转过来行吗?
      

  4.   

    Rotation PropertySets or retrieves the value that indicates whether the content is rotated in ninety-degree increments.SyntaxHTML: N/A 
    Scripting: object.filters.item("DXImageTransform.Microsoft.BasicImage").Rotation [ = iRotation ] 参数值:
    iRotation
    Integer that specifies or receives one of the following values: 0 Default. Content is not rotated. 
    1 Content is rotated 90 degrees. 
    2 Content is rotated 180 degrees. 
    3 Content is rotated 270 degrees. 
     The property is read/write. The property has a default value of 0.下面是个例子,也不错啊!
    ====================================
    <DIV ID="oDiv" STYLE="position:absolute; left:270px;" >
    <table border=1>
    <tr>
    <td>
    测试
    </td>
    </tr>
    </table>
    <IMG SRC='http://lucky.myrice.com/back.jpg' />
    </DIV>
    <BUTTON onclick="oDiv.style.filter= 'progid:DXImageTransform.Microsoft.BasicImage(rotation=3)'">
        Rotate 270 degrees</BUTTON><BR/>
    <BUTTON onclick="oDiv.style.filter=''">Clear Filter</BUTTON>
      

  5.   

    其实,也可以采用 SVG 做啊!
      

  6.   

    孟子E章
    我对你的敬仰如滔滔江水绵绵不绝
    不过你能再告诉我
    用SVG怎么做
    谢谢
      

  7.   

    http://go6.163.com/colorweb/svg/HelloWorld.svg
      

  8.   

    http://go6.163.com/colorweb/svg/Path.svg