RandomBars Filter


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

RandomBars Filter

RandomBars transition filter 는 대상물을 ramdom한 수평(Horizontal) 또는 수직(Vertical) line으로 transition 시키는 filter 입니다.

RandomBars filter
Property 설 명
Orientation
random bar가 생기는 방향. Default 값 없음.
Horizontal 수평 random bar로 화면 전환
Vertical 수직 random bar로 화면 전환
Duration Transition이 지속되는 시간의 초 단위. 예) Duration='1.0000' 이면 1초 지속.
html syntax <ELEMENT STYLE =
"filter:progid:DXImageTransform.Microsoft.RandomBars(sProperties)">
scripting object.style.filter =
"progid:DXImageTransform.Microsoft.RandomBars(sProperties)"
적용 대상 All block level elements.
Note




RandomBars Transition 예제


Source code
<html>
<head>
<title>RandomBars 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.filters.item("DXImageTransform.Microsoft.RandomBars").Orientation = "Horizontal";
obj.style.backgroundColor="royalblue";
obj.style.color = "#FFFFFF";
obj2.style.visibility="visible";
obj1.style.visibility="hidden";
}

else {
bState = 0;
obj.filters.item("DXImageTransform.Microsoft.RandomBars").Orientation = "Vertical";
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.RandomBars(Duration=2);
-->
</style>

</head>
<body>

<button onclick="fnToggle(topContainer, img_1, img_2)">Play RandomBars 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;">RandomBars Transition</span>
</div>

</body>
</html>


코드 실행 하기





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

Top
Back
New
검색