Html5实现移动端的画板(仅画直线)

本文详细介绍了如何使用HTML5的Canvas元素和JavaScript技术,在移动端创建一个仅支持绘制直线的画板应用。通过监听触屏事件,动态绘制用户在画布上的轨迹,实现简单但实用的绘画功能。
摘要由CSDN通过智能技术生成
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<script src="js/jquery.js"></script>
	<style type="text/css">
		input[type=button]{
			margin-left: 30px;
			margin-top: 10px;
			font-size: 40px;
			width: 200px;
			height: 50px;
		}
		input[type=text]{
			font-size: 40px;
			height: 35px;
		}
		input[type=color]{
			font-size: 40px;
			width: 448px;
			height: 35px;
		}
		label{
			margin-left: 30px;
		}
		.cover-box{
			position: fixed;
			width: 100%;
			height: 100%;
			background: rgba(0,0,0,0.2);
			display: none;
		}
		.buttons-box{
			background-color:white;
			width: 900px;
			height: 400px;
			position: fixed;left: 5%; top: 40%;
			border:1px #000000 solid;
			display:block;
		}
	</style>
	<body>
		<div class="cover-box">
			<div class = "buttons-box">
				<input style=&
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值