view

Esta tradução está incompleta. Ajude a traduzir este artigo em inglês

Uma view é uma maneira definida de visualizar a imagem, como um nível de zoom ou uma visualização de detalhes.

Usage context

CategoriasNenhum
Conteúdo permitidoQualquer número dos seguintes elementos, em qualquer ordem:
Elementos descritivos

Attributes

Global attributes

Specific attributes

Example

SVG

<svg width="600" height="200" viewBox="0 0 600 200"
    xmlns="http://www.w3.org/2000/svg"
    xmlns:xlink="http://www.w3.org/1999/xlink">
  <defs>
    <radialGradient id="gradient">
      <stop offset="0%" stop-color="#8cffa0" />
      <stop offset="100%" stop-color="#8ca0ff" />
    </radialGradient>    
  </defs>

  <circle r="50" cx="180" cy="50" style="fill:url(#gradient)"/>

  <view id="halfSizeView" viewBox="0 0 1200 400"/>
  <view id="normalSizeView" viewBox="0 0 600 200"/>
  <view id="doubleSizeView" viewBox="0 0 300 100"/>

  <a xlink:href="#halfSizeView">
    <text x="5" y="20" font-size="20">half size</text>
  </a>
  <a xlink:href="#normalSizeView">
    <text x="5" y="40" font-size="20">normal size</text>
  </a>
  <a xlink:href="#doubleSizeView">
    <text x="5" y="60" font-size="20">double size</text>
  </a>
</svg>

Result

DOM Interface

This element implements the SVGViewElement interface.

Specifications

Specification Status Comment
Scalable Vector Graphics (SVG) 2
The definition of '<view>' in that specification.
Candidata a Recomendação
Scalable Vector Graphics (SVG) 1.1 (Second Edition)
The definition of '<view>' in that specification.
Recomendação Initial definition

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
viewChrome Full support YesEdge Full support ≤18Firefox Full support 15IE No support NoOpera Full support YesSafari ? WebView Android Full support YesChrome Android Full support YesFirefox Android Full support 15Opera Android ? Safari iOS ? Samsung Internet Android Full support Yes
preserveAspectRatioChrome ? Edge ? Firefox ? IE No support NoOpera ? Safari ? WebView Android ? Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
viewBoxChrome ? Edge ? Firefox ? IE No support NoOpera ? Safari ? WebView Android ? Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
viewTargetChrome ? Edge ? Firefox ? IE No support NoOpera ? Safari ? WebView Android ? Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
zoomAndPan
DeprecatedNon-standard
Chrome ? Edge ? Firefox ? IE No support NoOpera ? Safari ? WebView Android ? Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Non-standard. Expect poor cross-browser support.
Non-standard. Expect poor cross-browser support.
Deprecated. Not for use in new websites.
Deprecated. Not for use in new websites.