用 canvas 绘制一朵玫瑰
今天是5月20日,博主突然想到以前照着网上的教程用 canvas
画的一幅玫瑰,现在在这里贴出代码,供大家参考
悲催的是博主有了玫瑰,却还没有赠与的人儿 呜呜呜~~
代码如下:
<html>
<head>
<meta charset="UTF-8">
<title>玫瑰花</title>
<style type="text/css">
body {
background-color: coral;
}
#shusheng {
position: absolute;
width: 100%;
height: 100%;
text-align: center;
}
#f {
font-size: 24px;
font-weight: block;
color: mediumblue;
font-family: "楷体";
}
</style>
<script type="text/javascript">
var name = "送你一朵玫瑰啊";
alert(name);
</script>
</head>
<body>
<div style="text-align: center">
<h1 id="f">
日高闲步下堂阶 细草春莎没绣鞋 折得玫瑰花一朵 凭君簪向凤凰钗
</h1>
</div>
<div id="shusheng">
<ca