<!DOCTYPE html>
<html>
<head>
<meta name="author" content="Yeeku.H.Lee(CrazyIt.org)" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<style>
div{
height:300px;
width:300px;
}
</style>
</head>
<body>
<div id="div1" style="background:linear-gradient(0deg, red,blue,yellow);"></div>
<script>
var val=0;
function change(){
document.getElementById("div1").style.background="linear-gradient(" + val++ + "deg,red,blue,yellow)";
}
window.setInterval(change,10);
</script>
</body>
</html>
html 红蓝黄线性渐变
最新推荐文章于 2021-06-26 05:23:23 发布