Home  >  Article  >  Web Front-end  >  DIV旋转的测试代码_html/css_WEB-ITnose

DIV旋转的测试代码_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:52:13767browse

<style type="text/css">.rat0 {	-webkit-transform: rotate(0deg);	-moz-transform: rotate(0deg);}.rat1 {	-webkit-transform: rotate(20deg);	-moz-transform: rotate(20deg);}.rat2 {	-webkit-transform: rotate(-20deg);	-moz-transform: rotate(-20deg);}.rat3 {	-webkit-transform: rotate(-50deg);	-moz-transform: rotate(-50deg);}.rat4 {	-webkit-transform: rotate(50deg);	-moz-transform: rotate(50deg);}</style><script type="text/javascript" src="jquery-2.1.1.min.js"></script><script type="text/javascript">var base_len = 100;var len = 700;function drawleaf(rat) {	var hdiv = "<div class='rat" + rat + "'><img  src='leaf.png' alt="DIV旋转的测试代码_html/css_WEB-ITnose" >";	$("#content").append(hdiv);}$(document).ready(function(){  //$("#content").append(hdiv);	for(var i=0; i<10; i++) {		drawleaf( Math.floor(Math.random() * ( 4 + 1)) );	}  });</script><div id="content" width="960"    style="max-width:90%"></div>

旋转的测试代码

参考:


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn