js+css实现汉字字帖手写练字描红代码
代码语言:html
所属分类:拖放
代码描述:js+css实现汉字字帖手写练字描红代码。gemini3生成
代码标签: js css 汉字 字帖 手写 练字 描红 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>在线汉字描红字帖</title>
<style>
body {
margin: 0;
padding: 0;
background-color: #f0f2f5;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
font-family: "KaiTi", "STKaiti", "楷体", serif; /* 优先使用楷体 */
user-select: none; /* 禁止选中文本 */
}
h1 {
color: #333;
margin-bottom: 20px;
font-size: 24px;
}
/* 字帖容器 */
.char-container {
position: relative;
width: 300px;
height: 300px;
background-color: #fff;
border: 4px solid #b71c1c; /* 红色边框 */
box-shadow: 0 10px 25px rgba(0,0,0,0.1);
cursor: crosshair;
touch-action: none; /* 防止手机端滚动 */
}
/* 米字格背景 (纯CSS绘制) */
.grid-bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0