CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
不看会后悔的Windows XP之经验谈 简单快捷DIY实用家庭影院
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Web 开发 >  ASP

在线等待答疑:在ASP的页面初始化如何使图片旋转一定的角度(0-90)度?

楼主mucel(尽力尽为)2006-05-04 09:21:50 在 Web 开发 / ASP 提问

用javascript是否可以实现?分数不够可以再加 问题点数:100、回复次数:10Top

1 楼mrshelly(Shelly)回复于 2006-05-04 09:34:17 得分 50

应该说。CSS可以实现。Top

2 楼moodboy1982(老鹰)回复于 2006-05-04 09:38:37 得分 0

可以!Top

3 楼mucel(尽力尽为)回复于 2006-05-04 09:43:18 得分 0

能给一下源代码吗?期待交流Top

4 楼moodboy1982(老鹰)回复于 2006-05-04 09:44:16 得分 10

给一个例子,自己参考吧。  
  例子太长,无法回复:  
  可以给我留言,或到:  
  http://www.esoftnow.com/bbs中给我发贴Top

5 楼mucel(尽力尽为)回复于 2006-05-04 10:05:30 得分 0

楼上给的参考例子在那里?Top

6 楼mrshelly(Shelly)回复于 2006-05-04 10:14:10 得分 0

1楼     meizz       (梅花雪)       回复于   2003-04-12   12:50:49     得分   30    
   
  <div       style="FILTER:       progid:DXImageTransform.Microsoft.BasicImage(Rotation=1);       height:       1px">        
      <img       src=www.gif></div>    
  Top

7 楼mrshelly(Shelly)回复于 2006-05-04 10:14:31 得分 10

PS:如果真要很好地控制图片。建议楼主用FLASH。Top

8 楼mucel(尽力尽为)回复于 2006-05-04 10:28:04 得分 0

to   mrshelly(Shelly)  
   
  你的这种方法Rotation=1,   比如旋转15度或30度要怎么写啊   ?Top

9 楼jobs002(Oh! Office)回复于 2006-05-04 10:31:14 得分 0

<img   src="10度的.gif">  
  <img   src="20度的.gif">  
  gif在图像处理软件处理,比如photoshop,fireworks..................Top

10 楼mrshelly(Shelly)回复于 2006-05-04 10:40:41 得分 30

FROM:   苏昱(dhtmlet   at   hotmail.com)   样式表滤镜中文手册    
  <script>  
  var   sFilter="filter   :   progid:DXImageTransform.Microsoft.Matrix(";  
  var   fM11,fM12,fM21,fM22,fDx,fDy,sType,sMethod;  
  var   oDiv,oCodeDiv,oTxtRotation,oBtnRotation;  
  var   i=0;  
   
  function   rdl_SetRotation(deg)   {  
  var   deg2rad=Math.PI*2/360;  
  rad=deg*deg2rad;  
  costheta   =   Math.cos(rad);  
  sintheta   =   Math.sin(rad);  
  with   (oDiv.filters.item(0))   {  
  M11=costheta;M12=-sintheta;M21=sintheta;M22=costheta;  
  }  
  rdl_UpdateMatrix();  
  }  
   
  function   rdl_DoAnimation(){  
  oDiv.onfilterchange=rdl_DoAnimation;  
  i+=5;  
  if   (i>359)   {  
  i=0;  
  oDiv.onfilterchange=null;  
  }  
  rdl_SetRotation(i);  
  }  
   
  function   rdl_UpdateMatrix()   {  
  with   (oDiv.filters.item(0))   {  
  fM11=Math.round(M11*10)/10;fM12=Math.round(M12*10)/10;fM21=Math.round(M21*10)/10;fM22=Math.round(M22*10)/10;  
  fDx=Math.round(Dx*10)/10;fDy=Math.round(Dy*10)/10;sType=FilterType;sMethod=SizingMethod;  
  }  
  oCodeDiv.innerText=sFilter+"SizingMethod="+sMethod+",FilterType="+sType+",Dx="+fDx+",Dy="+fDy+",M11="+fM11+",M12="+fM12+",M21="+fM21+",M22="+fM22+");";  
  }  
   
  function   rdl_Load(e){  
  oDiv=document.all("idDiv");  
  oCodeDiv=document.all("idCodeDiv");  
  oTxtRotation=document.all("idTxtRotation");  
  oBtnRotation=document.all("idBtnRotation");  
  var   oSelType=document.all("idSelType");  
  var   oSelSize=document.all("idSelSize");  
  oSelType.onchange=new   Function("with   (this)   oDiv.filters.item(0).filtertype=options(selectedIndex).value;rdl_UpdateMatrix();");  
  oSelSize.onchange=new   Function("with   (this)   oDiv.filters.item(0).SizingMethod=options(selectedIndex).value;rdl_UpdateMatrix();");  
  oTxtRotation.onclick=new   Function("if   (this.value.length>4)   this.value=0;");  
  oBtnRotation.onclick=new   Function("rdl_SetRotation(oTxtRotation.value);");  
  rdl_UpdateMatrix();  
  }  
   
  function   rdl_DoHFlip(e){  
  with   (oDiv.filters.item(0))   {M11=0-M11;M12=0-M12;}  
  rdl_UpdateMatrix();  
  }  
   
  function   rdl_DoVFlip(e){  
  with   (oDiv.filters.item(0))   {M21=0-M21;M22=0-M22;}  
  rdl_UpdateMatrix();  
  }  
   
  window.onload=rdl_Load;  
  </script>  
   
   
  <div   id=idParentDiv><div   id=idDiv>  
  <img   src="../images/rdl_body5.jpg"   align="right"><h2   >Matrix   Filter</h2><b>Written   by   Rain1977.<br>All   rights   reserved   .   Terms   of   Use   .</b>  
  </div></div>  
   
  <br>  
  <table><tr>  
  <td><input   type=button   value=左右反转   onclick="rdl_DoHFlip();"><input   type=button   value="上下反转"   onclick="rdl_DoVFlip();"></td>  
  <td   ><input   id=idTxtRotation   type=text   value="输入角度数字"   size=14></input>&nbsp;<input   id=idBtnRotation   type=button   value="旋转"></td>  
  <td   ><select   id=idSelSize><option   value="auto   expand">auto   expand</option><option   value="clip   to   original">clip   to   original</option></select></td>  
  <td   ><select   id=idSelType><option   value="bilinear">Bilinear</option><option   value="nearest">Nearest   Neighbour</option></select></td>  
  <td><input   type=button   value="动画"   onclick="rdl_DoAnimation();"></td>  
  </tr></table>  
  <br>  
  <div   id=idCodeDiv>filter</div>  
  Top

相关问题

关键词

得分解答快速导航

  • 帖主:mucel
  • mrshelly
  • moodboy1982
  • mrshelly
  • mrshelly

相关链接

  • Web开发类图书

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo