- SVG: Scalable Vector Graphics - MDN - Mozilla
Có thể bạn quan tâm
- References
- SVG
- Elements
- <g>
- English (US)
- Remember language
- Deutsch
- Español
- Français
- 日本語
- Português (do Brasil)
- Русский
- 中文 (简体)
- Example
- Usage context
- Specifications
- Browser compatibility
- SVG
- Tutorials
- Introducing SVG from scratch
- Introduction
- Getting started
- Positions
- Basic shapes
- Paths
- Fills and Strokes
- Gradients in SVG
- Patterns
- Texts
- Basic transformations
- Clipping and masking
- Other content in SVG
- Filter effects
- SVG fonts
- SVG image element
- Tools for SVG
- SVG and CSS
- Reference
- Elements
- <a>
- <animate>
- <animateMotion>
- <animateTransform>
- <circle>
- <clipPath>
- <cursor> Deprecated
- <defs>
- <desc>
- <ellipse>
- <feBlend>
- <feColorMatrix>
- <feComponentTransfer>
- <feComposite>
- <feConvolveMatrix>
- <feDiffuseLighting>
- <feDisplacementMap>
- <feDistantLight>
- <feDropShadow>
- <feFlood>
- <feFuncA>
- <feFuncB>
- <feFuncG>
- <feFuncR>
- <feGaussianBlur>
- <feImage>
- <feMerge>
- <feMergeNode>
- <feMorphology>
- <feOffset>
- <fePointLight>
- <feSpecularLighting>
- <feSpotLight>
- <feTile>
- <feTurbulence>
- <filter>
- <font-face-format> Deprecated
- <font-face-name> Deprecated
- <font-face-src> Deprecated
- <font-face-uri> Deprecated
- <font-face> Deprecated
- <font> Deprecated
- <foreignObject>
- <g>
- <glyph> Deprecated
- <glyphRef> Deprecated
- <hkern> Deprecated
- <image>
- <line>
- <linearGradient>
- <marker>
- <mask>
- <metadata>
- <missing-glyph> Deprecated
- <mpath>
- <path>
- <pattern>
- <polygon>
- <polyline>
- <radialGradient>
- <rect>
- <script>
- <set>
- <stop>
- <style>
- <svg>
- <switch>
- <symbol>
- <text>
- <textPath>
- <title>
- <tref> Deprecated
- <tspan>
- <use>
- <view>
- <vkern> Deprecated
- Attributes
- accent-height Deprecated
- accumulate
- additive
- alignment-baseline
- alphabetic Deprecated
- amplitude
- arabic-form Deprecated
- ascent Deprecated
- attributeName
- attributeType Deprecated
- azimuth
- baseFrequency
- baseline-shift
- baseProfile Deprecated
- bbox Deprecated
- begin
- bias
- by
- calcMode
- cap-height Deprecated
- class
- clip Deprecated
- clip-path
- clip-rule
- clipPathUnits
- color
- color-interpolation
- color-interpolation-filters
- cursor
- cx
- cy
- d
- data-*
- decoding
- descent Deprecated
- diffuseConstant
- direction
- display
- divisor
- dominant-baseline
- dur
- dx
- dy
- edgeMode
- elevation
- end
- exponent
- fill
- fill-opacity
- fill-rule
- filter
- filterUnits
- flood-color
- flood-opacity
- font-family
- font-size
- font-size-adjust
- font-stretch
- font-style
- font-variant
- font-weight
- fr
- from
- fx
- fy
- g1 Deprecated
- g2 Deprecated
- glyph-name Deprecated
- glyph-orientation-horizontal Deprecated
- glyph-orientation-vertical Deprecated
- gradientTransform
- gradientUnits
- hanging Deprecated
- height
- horiz-adv-x Deprecated
- horiz-origin-x Deprecated
- horiz-origin-y Deprecated
- href
- id
- ideographic Deprecated
- image-rendering
- in
- in2
- intercept
- k Deprecated
- k1
- k2
- k3
- k4
- kernelMatrix
- kernelUnitLength
- keyPoints
- keySplines
- keyTimes
- lang
- lengthAdjust
- letter-spacing
- lighting-color
- limitingConeAngle
- marker-end
- marker-mid
- marker-start
- markerHeight
- markerUnits
- markerWidth
- mask
- maskContentUnits
- maskUnits
- mathematical Deprecated
- max
- media
- method Experimental
- min
- mode
- name Deprecated
- numOctaves
- opacity
- operator
- order
- orient
- orientation Deprecated
- origin
- overflow
- overline-position
- overline-thickness
- paint-order
- panose-1 Deprecated
- path
- pathLength
- patternContentUnits
- patternTransform
- patternUnits
- pointer-events
- points
- pointsAtX
- pointsAtY
- pointsAtZ
- preserveAlpha
- preserveAspectRatio
- primitiveUnits
- r
- radius
- refX
- refY
- repeatCount
- repeatDur
- requiredFeatures Deprecated
- restart
- result
- rotate Experimental
- rx
- ry
- scale
- seed
- shape-rendering
- side Experimental
- slope
- spacing
- specularConstant
- specularExponent
- spreadMethod
- startOffset
- stdDeviation
- stemh Deprecated
- stemv Deprecated
- stitchTiles
- stop-color
- stop-opacity
- strikethrough-position
- strikethrough-thickness
- string Deprecated
- stroke
- stroke-dasharray
- stroke-dashoffset
- stroke-linecap
- stroke-linejoin
- stroke-miterlimit
- stroke-opacity
- stroke-width
- style
- surfaceScale
- SVG attribute: crossorigin
- systemLanguage
- tabindex
- tableValues
- target
- targetX
- targetY
- text-anchor
- text-decoration
- text-rendering
- textLength
- to
- transform
- transform-origin
- type
- u1 Deprecated
- u2 Deprecated
- underline-position
- underline-thickness
- unicode Deprecated
- unicode-bidi
- unicode-range Deprecated
- units-per-em Deprecated
- v-alphabetic Deprecated
- v-hanging Deprecated
- v-ideographic Deprecated
- v-mathematical Deprecated
- values
- vector-effect
- version Deprecated
- vert-adv-y Deprecated
- vert-origin-x Deprecated
- vert-origin-y Deprecated
- viewBox
- visibility
- width
- widths Deprecated
- word-spacing
- writing-mode
- x
- x-height Deprecated
- x1
- x2
- xChannelSelector
- xlink:arcrole Deprecated
- xlink:href Deprecated
- xlink:show Deprecated
- xlink:title Deprecated
- xlink:type Deprecated
- xml:lang Deprecated
- xml:space Deprecated
- y
- y1
- y2
- yChannelSelector
- z
- zoomAndPan Deprecated
- Guides
- Applying SVG effects to HTML content
- Content type
- Namespaces crash course
- SVG animation with SMIL
- SVG as an Image
- Example
- Usage context
- Specifications
- Browser compatibility
The <g> SVG element is a container used to group other SVG elements.
Transformations applied to the <g> element are performed on its child elements, and its attributes are inherited by its children. It can also group multiple elements to be referenced later with the <use> element.
Example
html, body, svg { height: 100%; } html<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <!-- Using g to inherit presentation attributes --> <g fill="white" stroke="green" stroke-width="5"> <circle cx="40" cy="40" r="25" /> <circle cx="60" cy="60" r="25" /> </g> </svg>Usage context
Categories | Container element, Structural element |
---|---|
Permitted content | Any number of the following elements, in any order:Animation elementsDescriptive elementsShape elementsStructural elementsGradient elements<a>, <clipPath>, <cursor>, <filter>, <font>, <font-face>, <foreignObject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> |
Specifications
Specification |
---|
Scalable Vector Graphics (SVG) 2 # GElement |
Browser compatibility
BCD tables only load in the browser
Help improve MDN
Was this page helpful to you?YesNoLearn how to contribute.This page was last modified on Apr 2, 2024 by MDN contributors.
View this page on GitHub • Report a problem with this contentTừ khóa » Svg G X Y
-
SVG Positioning - Stack Overflow
-
SVG Attribute Reference - SVG: Scalable Vector Graphics | MDN
-
SVG G Element
-
Understanding SVG Coordinate Systems And Transformations (Part 3)
-
Uses Of Interface ape.ILcdEllipse (LuciadFusion API ...
-
Uses Of Interface ape.ILcdArcBand
-
React Native SVG - GitHub
-
Zoom Not Working On Rect With Style Fill:none · Issue #130 - GitHub
-
Services - Galaxy International
-
Defaultazurecredential Get Token. Nov 28, 2018 · Azure Functions Tri...
-
How Old Was Tooka. Created On January 01 Apr 01, 2021 · Bibby Was A
-
If - NECSAL VISION