• html5阴影


    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>绘制阴影</title>
    </head>
    <body>
        <canvas id="myCanvas" width="500" height="400" style="border:3px dashed #0094ff;"></canvas>
    <script>
        var canvas = document.getElementById("myCanvas");
        var ctx = canvas.getContext("2d");
        //设置阴影的模糊度
        ctx.shadowBlur = 10;
        //设置阴影的颜色
        ctx.shadowColor = "#f00";
        //设置阴影在X、Y方向的偏移
        ctx.shadowOffsetX =6;
        ctx.shadowOffsetY = -5;
        ctx.strokeStyle = "#ff0";
        ctx.font = "50px 黑体";
        ctx.textBaseline = "top";
        ctx.strokeText("阴影文字小蕾", 100, 10)

        ctx.fillStyle = "#ff0";
        ctx.font = "50px 黑体";
        ctx.textBaseline = "top";
        ctx.fillText("阴影文字小蕾", 100, 120)

        ctx.fillRect(20, 200, 100, 150);
        ctx.lineWidth = 8;
        ctx.strokeRect(150, 200, 100, 150);

    </script>
    </body>
    </html>

  • 相关阅读:
    robotframework----模板的使用
    RF执行顺序
    RobotFrameWork(四)变量运算与Evaluate
    RobotFrameWork(三)数据类型
    git 命令
    常用网站
    git 应用
    ie if判断
    移动端rem适配
    绘制三角形(sass)
  • 原文地址:https://www.cnblogs.com/xiaoleidiv/p/3168617.html
Copyright © 2020-2023  润新知