Skip to content

🌈 包含文字溢出省略号、字体渐变、雪碧图、flex布局、刮刮卡、WebSQL、翻牌游戏、五子棋、拖拽上传、贪吃蛇、推箱子、拖拽换位、大富翁、飞机大战、连连看、猜位置等前端简单示例代码。

License

Notifications You must be signed in to change notification settings

linyisonger/H5.Examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

H5 示例代码

MITStars

https://linyisonger.github.io/H5.Examples/

可以直接打开链接即可

已有功能

  • 预览效果
  • 查看源码

示例截图

开发

新建文件钩子文件

用于提交时更新examples.txt,从而更新列表以及预览图。

.git/hooks/pre-commit

#!/bin/sh

# 复制文件进入文件夹
ls -R  *.html > examples.txt
git add examples.txt

新建示例文件

echo '' > "058.tesseract.js 文字识别.html"
# 或者
python .\build\new.py 思绪万千
# 或者
new 思绪万千

示例截图

执行以下命令之前需要配置

  • conda
  • vscode
    • Live Server
      • 目前我配置是6600端口,可根据自己端口进行修改index.py。

启用 Live Server 后再进行生成示例图片。

# 切换文件夹
cd build
# 使用conda新建环境
conda create --name h5-build-310 python==3.10
# 切换环境
conda activate h5-build-310
# 安装依赖
pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
# 生成截图,但是有些截图可能存在问题,将其删除重新执行python index.py即可
python index.py

打包new命令行

# 切换环境
conda activate h5-build-310
# 安装依赖
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pyinstaller
# 打包命令
Pyinstaller -F 

About

🌈 包含文字溢出省略号、字体渐变、雪碧图、flex布局、刮刮卡、WebSQL、翻牌游戏、五子棋、拖拽上传、贪吃蛇、推箱子、拖拽换位、大富翁、飞机大战、连连看、猜位置等前端简单示例代码。

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks