Friday, 10 January 2014

Cool effect with HTML, CSS and JavaScript

Code

<html>
<body>

<div style="width:100px;height:100px;background-color:red;" id="demo">
</div>

<script>
function Get()
{
document.getElementById('demo').style.width="500px";
document.getElementById('demo').style.height="500px";
document.getElementById('demo').style.backgroundColor="hsla(216,100%,50%,0)";
document.getElementById('demo').style.webkitBorderRadius="100px";
document.getElementById('demo').style.WebkitTransition="2s ease-out";
document.getElementById('demo').style.webkitTransform="rotate(1080deg)";
document.getElementById('demo').style.webkitTransform="skew(480deg)";

}

</script>
<input type="button" value="Click" onclick="Get()" />
</body>
</html>


Click on the button!

No comments:

Post a Comment