문제

I am still new to HTML/CSS/JavaScript so I am not sure of what can and can not be done. I am trying to use the clip property to reveal a div over time. Is this possible and if so how? I can only seem to access clip in JavaScript using quotations (ex. element.style.clip = "rect(x, x, x, x)".

I would like to have it read element.style.clip = "rect(x, x, scalerValuepx, x)".

Any help would be great.

Thank you.

도움이 되었습니까?

해결책

Without knowing much about your intended use of clip on a div, I would probably recommend giving the div in question overflow-y: hidden with CSS and gradually increasing the CSS height of the element until it is fully revealed.

There's some really easy to use animation methods in jQuery that do this, such as slideDown().

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top