当前位置:网站首页>Compréhension simple de SVG
Compréhension simple de SVG
2022-07-03 02:21:00 【Grand bateau, oncle.】
svg
canvasEtsvgLa différence
canvas:
- Canvas - Oui.H5Les nouvelles étiquettes,C'est une toile..UtilisationJavaScriptDessiner une image sur une page web.Canvas.Est rendu pixel par Pixel,Riche en couleurs,Distorsion d'échelle.
- Modifier le dessin Il faut redessiner toute la toile
svg:
- Graphiques vectoriels extensibles(Format d'image non déformé après l'échelle Scalable Vector Graphics)
- svgC'est parDOMFonctionnement pour afficher,svgChaque dessin est un noeud séparé,Pour faciliter la modification des styles.
svg
version:svg Numéro de version de la spécification suivie 1.0 1.1Deux versions
xmlns:DéfinitionsvgNomenclature.
x yIndique les coordonnées de départ widthEtheightIndique la largeur et la hauteur du rectangle Avant de définir la couleur de remplissage Noir par défaut fillDéfinir la couleur de remplissage
<svg version="1.1" xmlns="http://www.w3.org/2000/svg">
<rect x="30" y="30" width="100" height="100" fill="pink" class="r"/>
</svg>
svgChemin
M:moveTo Passer à un point de coordonnées
L:lineTo:Tracer une ligne vers un point de coordonnées
Z:closeFermé
stork:Couleur de la ligne
stork-width:Largeur de la ligne
<path d="M75,20 L100,100,L400,150,Z" fill="pink" stroke="yellow" stroke-width="10"> </path>
// Les majuscules sont absolues Les minuscules sont relatives Par rapport aux coordonnées précédentes
<path d="M75,20 l50,0,L50,10 Z" fill="" stroke="green" stroke-width=""> </path>
Cercle
cxEtcy C'est défini comme le Centre d'un cercle x yCoordonnées rRayon représentatif
<circle cx="100" cy="50" r="40" fill="" stroke="green" stroke-width="10">
Les paramètres représentent respectivement les coordonnées de départ Rayon maximum et rayon minimum Angle de rotation Grand et petit arc d'angle (1,0) Dans le sens contraire des aiguilles d'une montre(1,0) Coordonnées de la fin x y
<path d="M120,120 A60 60 0 1 1 121 121 Z" fill="" stroke="pink" stroke-width="20"> </path>
svgGradient
id Est le nom unique du gradient x1 y1 x2 y2 Direction du gradient de réglage
<defs>
<linearGradient id="grad" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="yellow" stop-opacity=""/>
<stop offset="33%" stop-color="blue" stop-opacity=""/>
<stop offset="66%" stop-color="green" stop-opacity=""/>
<stop offset="100%" stop-color="pink" stop-opacity=""/>
</linearGradient>
</defs>
// fillDéfinir la couleur de remplissage id C'est le nom du gradient
<rect x="10" y="10" width="200" height="200" fill="url(#grad)" style=""/>
svgAnimation
svg L'animation n'est pas disponible pour certaines scènes ,Il suffit de comprendre.
Suivez - moi.css L'animation ressemble beaucoup à
attriName:Déformation
type: Sélectionnez comment l'animation fonctionne Voici la rotation
form:Par où commencer?
to:Où ça finit
dur:Temps d'exécution de l'animation
repeatCount:Nombre de répétitions d'animation
<g>
<text x="150" y="100" style="">Manger Dormez. </text>
<animateTransform attributeName="transform"
attributeType="XML"
type="rotate"
from="0"
to="100"
dur="250ms"
repeatCount="indefinite"/>
</g>
svgTexte
Définir un itinéraire path id Nom de l'itinéraire d'exécution comme texte Selonid Sélectionnez le style d'alignement du texte
<defs>
<path d="M0 50 l100 100 l100 -100 Z " id="p1"/>
<path d="M0 50 l100 100 l100 -100 Z " id="p2"/>
</defs>
<text x="" y="" style="">
<textPath xlink:href="#p1">
Tao Dahua Fat Lin. C'est un sacré Groupe de six
</textPath>
</text>
边栏推荐
- GBase 8c系统表-pg_auth_members
- stm32F407-------DMA
- My creation anniversary
- [Flutter] dart: class; abstract class; factory; Class, abstract class, factory constructor
- The data in servlet is transferred to JSP page, and the problem cannot be displayed using El expression ${}
- Introduce in detail how to communicate with Huawei cloud IOT through mqtt protocol
- Method of removing webpage scroll bar and inner and outer margins
- es6 filter() 数组过滤方法总结
- Socket programming
- GBase 8c系统表-pg_am
猜你喜欢

Recommendation letter of "listing situation" -- courage is the most valuable

微信小程序开发工具 POST net::ERR_PROXY_CONNECTION_FAILED 代理问题
【ROS进阶篇】第六讲 ROS中的录制与回放(rosbag)

PyTorch 卷积网络正则化 DropBlock

返回一个树形结构数据

创建+注册 子应用_定义路由,全局路由与子路由

8 free, HD, copyright free video material download websites are recommended

微信小程序開發工具 POST net::ERR_PROXY_CONNECTION_FAILED 代理問題
![[shutter] shutter debugging (debugging fallback function | debug method of viewing variables in debugging | console information)](/img/66/0fda43da0d36fc0c9277ca86ece252.jpg)
[shutter] shutter debugging (debugging fallback function | debug method of viewing variables in debugging | console information)

Detailed introduction to the deployment and usage of the Nacos registry
随机推荐
Startup mode and scope builder of collaboration in kotlin
深度学习笔记(持续更新中。。。)
Awk from introduction to earth (0) overview of awk
使用Go语言实现try{}catch{}finally
Ni visa fails after LabVIEW installs the third-party visa software
Introduce in detail how to communicate with Huawei cloud IOT through mqtt protocol
Depth (penetration) selector:: v-deep/deep/ and > > >
stm32F407-------ADC
缺少库while loading shared libraries: libisl.so.15: cannot open shared object file: No such file
COM and cn
udp接收队列以及多次初始化的测试
leetcode961. Find the elements repeated N times in the array with length 2n
502 (bad gateway) causes and Solutions
Gbase 8C system table PG_ authid
awk从入门到入土(1)awk初次会面
Iptables layer 4 forwarding
Cfdiv2 fixed point guessing- (interval answer two points)
MySQL学习03
力扣(LeetCode)183. 从不订购的客户(2022.07.02)
[shutter] shutter debugging (debugging fallback function | debug method of viewing variables in debugging | console information)