Skip to content

Instantly share code, notes, and snippets.

@damiancastelao
Last active March 8, 2022 17:43
Show Gist options
  • Save damiancastelao/232b0cb8ddcd4259490a713b691a423b to your computer and use it in GitHub Desktop.
Save damiancastelao/232b0cb8ddcd4259490a713b691a423b to your computer and use it in GitHub Desktop.
Uso de viewBox de los SVG
<html>
<head>
<style type='text/css'>
#contenedor {
display: flex;
flex-wrap: wrap;
}
#contenedor div {
flex-direction: row;
flex-grow: 1;
border: solid;
background-color: beige;
}
</style>
</head>
<body>
<div id="contenedor">
<div>
<svg viewBox="0 0 100 100">
<rect width="100" height="100" fill="#9daaaa"/>
</svg>
</div>
<div>
<svg viewBox="0 0 100 100">
<circle cx="50" cy="50" r="50" fill="#9daaaa"/>
</svg>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment