当前位置: 首页 > wzjs >正文

周口市网站建设台州网站优化公司

周口市网站建设,台州网站优化公司,算命网站建设,公司做网站多需求: 如下图,要实现左图的样式,先实现框架,文字到时候 往里填就行了,原来的解决方案是想用css,html来实现,发现实现起来蛮麻烦的。我也没找到合适的实现方法,最后换使用canvas来实现&#xff…

需求:

如下图,要实现左图的样式,先实现框架,文字到时候 往里填就行了,原来的解决方案是想用css,html来实现,发现实现起来蛮麻烦的。我也没找到合适的实现方法,最后换使用canvas来实现,使用的js库是leaferui

1.安装:用game是因为有一些交互,反正体积也不大

npm install leafer-game

2.wxml

    <canvas:style="'width:'+cabox.width+'px;height:'+cabox.height+'px;'"id="leafer"type="2d":width="cabox.width":height="cabox.height"catchtouchstart="receiveEvent"catchtouchmove="receiveEvent"catchtouchend="receiveEvent"catchtouchcancel="receiveEvent"></canvas>

3.javascript

  lf = new Leafer({view: window, width: that.cabox.width, height: that.cabox.height})lf.add(Rect.one(0,0,that.cabox.width,that.cabox.height));lf.add(Rect.one({width: that.cabox.width, height: that.cabox.height, strokeWidth: 2, stroke: "black",}));lf.add(Rect.one({strokeWidth: 2,stroke: "black",width: (that.cabox.perBox * 11.5),height: (that.cabox.perBox * 11.5),x: that.cabox.perBox * 1.75,y: that.cabox.perBox * 1.75}));lf.add(Rect.one({strokeWidth: 2,stroke: "black",width: (that.cabox.perBox * 9),height: (that.cabox.perBox * 9),x: that.cabox.perBox * 3,y: that.cabox.perBox * 3}));lf.add(Line.one({stroke: "black",strokeWidth: 2,points: [0, 0, that.cabox.perBox * 3, that.cabox.perBox * 3]}));lf.add(Line.one({stroke: "black",strokeWidth: 2,points: [that.cabox.width, 0, that.cabox.perBox * 12, that.cabox.perBox * 3]}));lf.add(Line.one({stroke: "black",strokeWidth: 2,points: [that.cabox.width, that.cabox.height, that.cabox.perBox * 12, that.cabox.perBox * 12]}));lf.add(Line.one({stroke: "black",strokeWidth: 2,points: [0, that.cabox.height, that.cabox.perBox * 3, that.cabox.perBox * 12]}));lf.add(Line.one({stroke: "black",strokeWidth: 2,points: [that.cabox.perBox*6, 0, that.cabox.perBox*6, that.cabox.height]}));lf.add(Line.one({stroke: "black",strokeWidth: 2,points: [that.cabox.perBox*9, 0, that.cabox.perBox*9, that.cabox.height]}));lf.add(Line.one({stroke: "black",strokeWidth: 2,points: [0, that.cabox.perBox*6, that.cabox.width, that.cabox.perBox*6]}));lf.add(Line.one({stroke: "black",strokeWidth: 2,points: [0, that.cabox.perBox*9, that.cabox.width, that.cabox.perBox*9]}));

http://www.dtcms.com/wzjs/113465.html

相关文章:

  • 做网站对外贸有什么用网站seo关键词排名查询
  • 网站建设项目收费标准地推团队接单平台
  • 政府门户网站建设经验做法个人怎么做互联网推广平台
  • 旅游网站策划书百度网盟推广
  • 如何去做网络推广页面优化的方法
  • 设置备份管理wordpress长沙谷歌优化
  • 国外设计公司名字seo工资
  • 快递公司网站源码舆情监测系统
  • 微信编辑器做网站引流最好的推广方法
  • 南阳企业网站建设公司体验营销案例分析
  • 南京公司网站开发百度搜索关键词排名人工优化
  • 忘记网站后台用户名长沙网站建站模板
  • wordpress首页文件夹seo优化推广工程师招聘
  • 厦门网站建设 首选猴子网络seo技术最新黑帽
  • 乐东黎族自治县住房建设局网站chrome浏览器下载安卓手机
  • 外贸网站 在线留言建设网站的十个步骤
  • 自己做的旅游网站 介绍世界球队实力排名
  • 常州化龙巷网站favicon.ico百度站长工具链接提交
  • 网站建设hengfengera百度网盘官方
  • 天津做网站选择津坤科技c相亲网站排名前十名
  • 网站怎么更新内容百度指数搜索榜度指数
  • 个人可以做视频网站吗百度招聘网最新招聘信息
  • 建筑人才网下载广东网站优化公司
  • 魔站网站开发广东佛山疫情最新情况
  • 河南专业网站建设开发团队网站推广多少钱一年
  • 解放碑电子商务网站建设济南seo外包公司
  • 绵阳高新区建设局网站腾讯广告推广怎么做
  • 凡科网站做商城青岛关键词优化报价
  • 厦门网站建设培训费用百度seo外包
  • 网站更新后 为什么不显示东莞寮步最新通知