最近比较闲,除了在群里给大家交流交流,就没啥学习重心。看了论坛里的各种帖子,各种问题满天飞,这里我就整理了2个h5 canvas的demo,分享给大家!
使用html5的canvas实现刮刮乐功能
舍不得买2块钱的刮刮乐,就只能写个类似的功能过过彩票瘾了!
布局
background-color:lightskyblue;border-radius:5px;float:left;">
text-align:center;font-size:33px;color:blueviolet;">NICK彩票
color:peachpuff;display:flex;justify-content:center;
align-items:center;flex-direction:column;">
祝
君
中
奖
height:200px;position:relative;">
top:0;left:0;z-index:1;text-align:center;line-height:200px;
font-weight:bold;font-size:56px;color:indianred;">一等奖
style="position:absolute;top:0;left:0;z-index:2;">
这段html要注意的地方有2个:fle