JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://files.cnblogs.com/iamzhanglei/JscexMin.js" type="text/javascript"></script>
<canvas id="myCanvas" width="600" height="500" style="border:15px solid gray;
-moz-border-radius-bottomleft:40px;
-moz-border-radius-bottomright:40px;
-webkit-border-bottom-left-radius:40px;
-webkit-border-bottom-right-radius:40px;
-webkit-border-top-left-radius:40px;
-webkit-border-top-right-radius:40px;">
Your browser does not support the canvas element.
</canvas>
<script type="text/javascript">
var c = document.getElementById("myCanvas");
var cxt = c.getContext("2d");
cxt.lineWidth = 16;
var startX = 250;
var startY = 250;
var drawHeart = eval(Jscex.compile("async", function () {
var a = 112;
for (var i = -400; i < 360; i++) {
cxt.strokeStyle ="#FF0000";
x = a * (1 - Math.sin(i * Math.PI / 360)) * Math.cos(i * Math.PI / 360);
y = a * (1 - Math.sin(i * Math.PI / 360)) * Math.sin(i * Math.PI / 360);
cxt.lineTo(startX + x, startY - y);
cxt.stroke();
$await(Jscex.Async.sleep(10))
}
}))
</script>
<style type="text/css">
input.css3btn{
background: -moz-linear-gradient(270deg, #d2ebf8, #0c8ab5);
background: -webkit-linear-gradient(top, #d2ebf8, #0c8ab5);
background: -o-linear-gradient(top, #d2ebf8, #0c8ab5);
filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#000099CC', EndColorStr='#FF0087B4');
border-top: 1px solid #38538c;
border-right: 1px solid #1f2d4d;
border-bottom: 1px solid #151e33;
border-left: 1px solid #1f2d4d;
border-radius: 4px;
box-shadow: inset 0 1px 10px 1px #5c8bee, 0px 1px 0 #1d2c4d, 0 2px 0px #1f3053, 0 4px 4px 1px #111111;
color:#f0f0f0;
font: bold 20px "helvetica neue", helvetica, arial, sans-serif;
padding: 10px 0 10px 0;
text-align: center;
text-shadow: 0px -1px 1px #1e2d4d;
...