Element SVG jest podstawowym kształtem SVG, używanym do tworzenia okręgów w oparciu o punkt środkowy i promień.<circle>
html, body, svg {height: 100%}
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<circle cx="50" cy="50" r="50" />
</svg>
Atrybuty
cx
- Ten atrybut definiuje współrzędną osi X środka elementu.
Typ wartości : <długość> | <procent> ; Wartość domyślna :0
; Animowalny : tak cy
- Ten atrybut definiuje współrzędną osi y środka środka elementu.
Typ wartości : <długość> | <procent> ; Wartość domyślna :0
; Animowalny : tak r
- Ten atrybut definiuje promień elementu.
Wartość mniejsza lub równa zero powoduje wyłączenie renderowania okręgu.
Typ wartości : <length> ; Wartość domyślna :0
; Animowalny : tak ścieżkaLength
- Ten atrybut pozwala określić całkowitą długość ścieżki w jednostkach użytkownika.
Typ wartości : <liczba> ; Wartość domyślna : brak ; Animowalny : tak
Uwaga: Począwszy od SVG2 i Geometria Propertie s, czyli te atrybuty mogą być również używane jako właściwości CSS dla tego elementu.SVG2 cx
, cy
and r
are
Globalne atrybuty
- Główne atrybuty
- Przede wszystkim:
id
,tabindex
- Atrybuty stylizacji
class
,style
- Atrybuty warunkowego przetwarzania
- Przede wszystkim:
requiredExtensions
,systemLanguage
- Atrybuty zdarzeń
- Global event attributes, Graphical event attributes
- Presentation Attributes
- Most notably:
clip-path
,clip-rule
,color
,color-interpolation
,color-rendering
,cursor
,display
,fill
,fill-opacity
,fill-rule
,filter
,mask
,opacity
,pointer-events
,shape-rendering
,stroke
,stroke-dasharray
,stroke-dashoffset
,stroke-linecap
,stroke-linejoin
,stroke-miterlimit
,stroke-opacity
,stroke-width
,transform
,vector-effect
,visibility
- ARIA Attributes
aria-activedescendant
,aria-atomic
,aria-autocomplete
,aria-busy
,aria-checked
,aria-colcount
,aria-colindex
,aria-colspan
,aria-controls
,aria-current
,aria-describedby
,aria-details
,aria-disabled
,aria-dropeffect
,aria-errormessage
,aria-expanded
,aria-flowto
,aria-grabbed
,aria-haspopup
,aria-hidden
,aria-invalid
,aria-keyshortcuts
,aria-label
,aria-labelledby
,aria-level
,aria-live
,aria-modal
,aria-multiline
,aria-multiselectable
,aria-orientation
,aria-owns
,aria-placeholder
,aria-posinset
,aria-pressed
,aria-readonly
,aria-relevant
,aria-required
,aria-roledescription
,aria-rowcount
,aria-rowindex
,aria-rowspan
,aria-selected
,aria-setsize
,aria-sort
,aria-valuemax
,aria-valuemin
,aria-valuenow
,aria-valuetext
,role
Usage notes
missing
Specifications
Specification | Status | Comment |
---|---|---|
Scalable Vector Graphics (SVG) 2 The definition of '<circle>' in that specification. |
Candidate Recommendation | |
Scalable Vector Graphics (SVG) 1.1 (Second Edition) The definition of '<circle>' in that specification. |
Recommendation | Początkowa definicja |
Zgodność przeglądarki
BCD tables only load in the browser
Tabela zgodności na tej stronie jest generowana na podstawie danych strukturalnych. Jeśli chcesz przyczynić się do danych, sprawdź https://github.com/mdn/browser-compat-data i wyślij nam prośbę o wycofanie.
Zobacz też
- Inne podstawowe kształty SVG:
<ellipse>
,<line>
,<polygon>
,<polyline>
, { {SVGElement ("rect")}}