Skip to content

Instantly share code, notes, and snippets.

Created May 5, 2014 05:46
Show Gist options
  • Save anonymous/cb9d366dbcd400b9e753 to your computer and use it in GitHub Desktop.
Save anonymous/cb9d366dbcd400b9e753 to your computer and use it in GitHub Desktop.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Cartografía</title>
<script type="text/javascript" src="LibreVPN_files/d3.js"></script>
<script type="text/javascript" src="LibreVPN_files/index.js"></script>
<link type="text/css" rel="stylesheet" href="LibreVPN_files/force.css">
<link type="text/css" rel="stylesheet" href="LibreVPN_files/example-styles.css">
<link href="LibreVPN_files/Content.css" type="text/css" rel="stylesheet">
<style>
#todo {
width: 700px;
height: 560px;
background: url('menu-inicio.png') no-repeat transparent;
}
svg {
/* esto es sólo para que veas bien el cuadro que es el svg. Podrías
reducirlo al tamaño del hexágono así nunca se genera más grande. Son las
primeras 2 líneas del force.js.. */
background: none;
/* la imagen tiene 560 de alto, el centro (560/2) está en 280. Ahí, hay
que centrar el svg, que tiene 200 de alto. O sea su centro está en
100. Por eso: 280 - 100 = 180px. */
margin-top: 50px;
/* la imagen tiene 700 de ancho, el centro (700/2) está en 350. Ahí, hay
que centrar el svg, que tiene 500 de ancho. O sea su centro está en
250. Por eso: 350 - 250 = 150px. */
margin-left: 150px;
}
</style>
</head>
<body>
<div id="todo">
<div id="chart"></div>
<script type="text/javascript" src="LibreVPN_files/force.js"></script>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment