怎样改变Slide Transition滤镜的方向?
作者:佚名 日期:2010年12月13日 来源:不详 浏览: 次
如下网页代码,在使用IE中特有的CSS滤镜Slide Transition Filter时,默认是从右向左移动,如何实现从左向右移动?
具体来说,下面代码在点击按钮后,id为“oDiv”的div的背景色将由黄变绿,其过程表现为绿色盒子把黄色盒子从右向左推开,怎样才能实现绿色盒子把黄色盒子从左向右推开?
HTML code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<head>
<body>
<h2>Using the Blinds Transition</h2>
Click the following button to play the <b>Blinds</b> transition. A random number
is assigned to the <b>Bands</b> property that makes the transition look
different each time it is played.
<P>
<SCRIPT type="text/javascript">
var bToggle = 0;
function fnToggle() {
oDiv.filters[0].Apply();
oDiv.filters[0].bands =1;
if (bToggle) {
bToggle = 0;
oDiv.style.backgroundColor="gold";}
else {
bToggle = 1;
oDiv.style.backgroundColor="blue";}
oDiv.filters[0].Play(duration=1);
}
</SCRIPT>
<BUTTON onclick="fnToggle()">Toggle Transition</BUTTON><BR/><BR/>
<DIV ID="oDiv" STYLE="height:250px; width:250px; background-color: gold;
filter:progid:DXImageTransform.Microsoft.slide(
slideStyle='PUSH');">
Hello World
</DIV>
</BODY>
</html>
没人回答^