GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - StudyForFun/p2e: 使用Canvas将普通图片转换成一个div标签,并使用box-shadow将整张图还原,可设置还原等级

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

10 Commits
10 Commits

Folders and files

NameName
Last commit message
Last commit date
imgs
imgs
 
 
src
src
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
index.html
index.html
 
 

Repository files navigation

p2e

使用Canvas将普通图片转换成一个div标签,并使用box-shadow将整张图还原,可设置还原等级

灵感源自:http://codepen.io/HugoGiraudel/full/gpcwa/

在线DEMO:http://mailzwj.github.io/p2e/

使用文档

参数

  • size: 整数,色块儿尺寸,单位为像素
  • attrs: 对象,生成html元素的属性
  • space: 整数,生成html元素色块间隙,默认1
  • radius: 整数,生成html元素色块圆角大小,默认undefined

实例方法

  • get(n): 获取参数值,返回传入属性对应的值
  • set(n, v): 设置参数值
  • drawImage(img, callback): 绘制图片,img可为图片url或img标签,callback为绘制成功后的回调函数
  • getHtml(): 获取转换完成后得到的html标签和样式

About

使用Canvas将普通图片转换成一个div标签,并使用box-shadow将整张图还原,可设置还原等级

Resources

Readme
Activity
Custom properties

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.