日期:2014-05-18  浏览次数:20559 次

在vs2005和html中实现渐变过渡样式的图片轮换效果问题
为什么在html中可以实现渐变过渡样式的图片轮换效果,但把以下代码放到vs2005中就不能实现渐变过渡样式,即不能执行: style="FILTER:progid:DXImagetransform.Microsoft.Gradientwipe(duration=3,gradientSize=0.5,motion=forward ); WIDTH: 518px; HEIGHT: 192px">.在vs2005中出现:css验证:"filter"不是有效的css属性名的提示.
代码:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
  <title>无标题页</title>
</head>
<BODY >
<center>
  <table height="205" cellspacing="0" cellpadding="0" width="643" 
  border="0">
  <tbody>
  <tr>
  <td><img height="197" src="images/left.jpg" width="6"></td>
  <td align=middle height=192><div id="fc" 
  style="FILTER:progid:DXImagetransform.Microsoft.Gradientwipe(duration=3,gradientSize=0.5,motion=forward ); WIDTH: 518px; HEIGHT: 192px">
  <div style="display:block"><img 
  onmouseover=clearAuto(); onmouseout=setAuto() height="192" 
  src="images/01.jpg" width="518" border=0></A></div>
  <div style="DISPLAY: none"><img 
  onmouseover=clearAuto(); onmouseout=setAuto() height="192" 
  src="images/02.jpg" width="518" border=0></A> </div>
  <div style="display: none"><img 
  onmouseover=clearAuto(); onmouseout=setAuto() height="192" 
  src="images/03.jpg" width="518" border=0></A> </div>
  <div style="display: none"><img 
  onmouseover=clearAuto(); onmouseout=setAuto() height="192" 
  src="images/04.jpg" width="518" border=0></A> </div>
  </div></td>
  </tr>
  </tbody>
  </table>
</center>
<script language="javascript" src="js/pic.js"></script>
</BODY>
</HTML>

------解决方案--------------------
默认是XHTML1.0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
你换个HTML 4.0的文档类试一试,
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
这个跟VS2005没关系。
------解决方案--------------------
cnblogs园前几天有个人用jquery写了一个仿百度图片轮换的文章,代码页很全你可以去找找看是不是你要的。
------解决方案--------------------
你把aspx页面生成的html代码,和你原来能运行的html页面的代码比较下。
不是文档格式的问题就是你的aspx页面的代码有问题了