1 Star 0 Fork 0

Jiang / gsap

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
Clone or download
网页可视化开发核心.html 1.15 KB
Copy Edit Web IDE Raw Blame History
Jiang authored 2019-07-17 22:33 . GSAP
<html>
<head>
<meta charset="UTF-8" />
<title></title>
<script src="js/jquery-1.11.0.js" type="text/javascript" charset="utf-8"></script>
<script src="js/TweenMax.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
$(document).ready(function() {
//获取表单的数据,然后生成json对象,将对象传入GSAP语句完成样式生成
var inputInfoSheet = {}//
function getInfo() {
for(var i = 0; i < $('input').size(); i++) {
var $this = $('input').eq(i)
var id = $this.attr('id')
var value = $this.val()
inputInfoSheet[id] = value
}
console.log(inputInfoSheet);
}
$('input').change(function() {
getInfo()
if(inputInfoSheet.css != null) {
delete inputInfoSheet['css']
}
TweenMax.to('.box', 0.6, inputInfoSheet)
})
})
</script>
</head>
<body>
width<input type="" name="width" id="width" value="" /><br /> height
<input type="" name="height" id="height" value="" /><br /> background-color
<input type="" name="background-color" id="backgroundColor" value="" /><br />
<div class="box">
</div>
</body>
</html>

Comment ( 0 )

Sign in for post a comment

JavaScript
1
https://gitee.com/qq34347476/gsap.git
git@gitee.com:qq34347476/gsap.git
qq34347476
gsap
gsap
master

Search

103611 48b8ff67 1899542 103622 4d02230c 1899542