RandomDissolve Filter


Home > Document > Web design > CSS > Filter > Transition > RandomDissolve

RandomDissolve Filter

RandomDissolve transition filter는 random하게 선택된 pixel 단위로 화면을 전환시키는 filter 입니다.

filter
Property 설 명
Duration Transition이 지속되는 시간의 초 단위. 예) Duration='1.0000' 이면 1초 지속.
html syntax <ELEMENT STYLE =
"filter:progid:DXImageTransform.Microsoft.RandomDissolve(sProperties)">
scripting object.style.filter =
"progid:DXImageTransform.Microsoft.RandomDissolve(sProperties)"
적용 대상 All block level elements.
Note



RandomDissolve Transition 예제


Source code
<html>
<head>
<title>RandomDissolve transition filter</title>
<script type="text/javascript">
<!--
var bState = 0;
function fnToggle(obj, obj1, obj2) {
obj.filters[0].Apply();
if (bState == 0) {
bState = 1;
obj.style.backgroundColor="royalblue"
obj.style.color = "#FFFFFF"
obj2.style.visibility="visible";
obj1.style.visibility="hidden";
}
else {
bState = 0;
obj.style.backgroundColor="#ffffcc"
obj.style.color = "#000000"
obj2.style.visibility="hidden";
obj1.style.visibility="visible";
}

obj.filters[0].Play();
}
// -->
</script>
<style type="text/css">
<!--
.container{
width:200px;
height:200px;
position:relative;
top:50px;
left:50px;
background-color:#ffffcc;
border:1px solid tomato;
font:bold 18px verdana;
padding:10px;
filter: progid:DXImageTransform.Microsoft.RandomDissolve(Duration=1);
}
-->
</style>
</head>
<body>

<button type="button" onclick="fnToggle(topContainer, img_1, img_2)">
Play RandomDissolve Filter</button>

<div class="container" id="topContainer">

<img id="img_1" style="position:absolute" src="images/twins.gif" width="136" height="136"
alt="mc2_dice (6K)" />

<img id="img_2" style="visibility:hidden;position:absolute" src="images/mc2_dice.gif"
width="136" height="136" alt="twins (7K)" />

<span style="position:absolute;bottom:10px;">RandomDissolve Transition</span>

</div>

</body>
</html>


코드 실행 하기





이 문서의 저작권은 www.cadvance.org 에 있습니다.

Top
Back
New
검색