首页| 新闻| 科技| 人物| 科学| 话题| 运营| 设计| 开发| 服务器| 学院| 产品| 网文| 娱乐| 游戏| 图片
高清屏出现以前,屏幕的一个物理像素就是css所定义的一个逻辑像素(估计那个时候还没有物理像素和逻辑像素的概念)。因此使用下面代码就可以在浏览器中展示一个600x386的Canvas。
<html> <head> <title>Canvas demo</title> <style> * { padding: 0; margin: 0; } html, body { width: 100%; } #canvas { display: block; border: 1px solid red; margin: 10px auto 0; } </style> </head> <body> <canvas id="canvas" width="600" height="386">Canvas is not supported</canvas> <script> var canvas = document.getElementById('canvas'); var ctx = canvas.getContext('2d'); ctx.beginPath(); ctx.arc(300, 150, 20, 0, Math.PI*2); ctx.fillStyle = "#0095DD"; ctx.fill(); ctx.closePath(); </script> </body></html>
总结
以上所述是小编给大家介绍的高清屏中使用Canvas绘图出现模糊的问题及解决方法,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对CuoXin错新网网站的支持!
phpwind9.0系统的视觉进化论(
phpwind 的编码错误导致cookie
phpwind的rewrite重写原理
南国有佳人,容华若桃李
怀念青春,憧憬着自己的美好未来
中国旅游景点集锦 美丽的风景
名胜古迹风景 最美的景色
路边摊小吃 酒香不怕巷子深
特色路边摊小吃 下班路上的一道美食
爷爷都是从孙子走过来的
我太帅了,睡不着咋整啊
新闻热点
疑难解答
图片精选
flvplayer.swf flv视频播放器使用
在线FLV播放器实现方法
网页图片处理教程:优化带锯齿PNG图
HTML5高级编程之像素处理及粒子效
网友关注