当前位置:网站首页>The difference between SVG and canvas
The difference between SVG and canvas
2022-06-30 04:56:00 【Front end students】
svg Definition
1. Scalable vector graphics
2. Is based on xml Make a drawing
3.svg In case of enlargement or change of size, the graphic quality will not be damaged .
4.svg Every one of them is drawn ⼀ The elements of each figure are unique ⽴ Of DOM node ,
canvas Definition
1.h5 New properties
2. be based on js Make a drawing
Difference between them
1、svg Each graph can be regarded as an object , If the object properties change , The browser automatically reproduces the drawing . Change the change part automatically according to the change .canvas If the drawing is finished , Will no longer get the attention of the browser . If the position of the graph changes , The browser needs to be redrawn .
2、canvas Depending on resolution ,svg Independent of resolution .
3、canvas Event handler is not supported ,svg Support .Canvas The image drawn All in Canvas Inside this canvas , yes Canvas Part of , Out-of-service js Get the drawn graphic elements .
SVG A graph of corresponds to an element , So we can deal with DOM The elements are the same , Easy to give SVG Add the corresponding mouse event to the graphic element , This is also SVG Compare with Canvas A very big advantage of is that it can make the user interaction of graphics very simple .
4、canvas For large render area programs ( Like Google Maps ),svg Suitable for image intensive games .
边栏推荐
- Keywords implements and @override
- z-index属性在什么情况下会失效?
- Check London attractions suitable for parents and children in winter vacation
- C # equipment synthesis
- 力扣704. 二分查找
- Unity a* road finding force planning
- Unity download and installation website
- JPA复合主键使用
- Detailed explanation of the process of "flyingbird" small game (camera adjustment and following part)
- [UAV] kinematic analysis from single propeller to four rotor UAV
猜你喜欢
![[fpga] implementation of IIC read / write EEPROM](/img/6a/36e9355058a90d98cffafcbaa1930b.png)
[fpga] implementation of IIC read / write EEPROM

Deep learning ----- different methods to realize inception-10

pycharm 数据库工具

How to repair expired SSL certificates?

Unity lens making

Detailed explanation of the process of "flyingbird" small game (camera adjustment and following part)

Singapore parent-child tour, these popular attractions must be arranged

【Paper】2021_ Uniformity of heterogeneous hybrid multi-level intelligent systems using UGV and UAV

PS1 Contemporary Art Center, Museum of modern art, New York

Unity3d realizes Google Digital Earth
随机推荐
【Paper】2019_ Consensus Control of Multiple AUVs Recovery System Under Switching Topologies and Time D
Unity3d realizes Google Digital Earth
Pourquoi l'ordinateur n'a - t - il pas de réseau après l'ouverture du Hotspot win10?
One interview question every day to talk about the process of TCP connection and disconnection
One interview question a day - the underlying implementation of synchronize and the lock upgrade process
A collection of errors encountered in machine learning with unity
力扣27. 移除元素
Unreal 4 learning notes - data storage using blueprints
z-index属性在什么情况下会失效?
0 basic unity course. Bricklaying
Passing values between classes using delegates and events
pycharm 数据库工具
Oculus quest2 development: (I) basic environment construction and guide package
What is multimodal interaction?
Webots learning notes
Redis implements SMS login function (I) traditional session login
Unity3d lookat parameter description
Webots notes day 2
【Paper】2015_ Coordinated cruise control for high-speed train movements based on a multi-agent model
[fpga] implementation of IIC read / write EEPROM