【问题标题】:Setting a map as background using css or using equirectangular map projection in the background使用 css 将地图设置为背景或在背景中使用 equirectangular 地图投影
【发布时间】:2014-03-31 14:19:27
【问题描述】:

考虑链接http://jsfiddle.net/5D5eD/18/。在此链接中,如何设置像 http://bl.ocks.org/mbostock/3757119 这样的 equirectangular 投影作为背景,或者我可以在 css 背景中使用地图图像,背景应该仅限于 X 轴上方的图表。

 .grid .tick {
stroke: lightgrey;
opacity: 0.7;
   }
 .grid path {
  stroke-width: 0;
  }
 .chart {
  }
.main text {
font: 10px sans-serif;
 }
 .axis line, .axis path {
shape-rendering: crispEdges;
stroke: black;
fill: none;
}
circle {
fill: steelblue;
}

【问题讨论】:

    标签: javascript html css svg d3.js


    【解决方案1】:

    我能够使用此代码获取背景

              body
              {
              background-image:url("image.png");
              background-repeat:no-repeat;
              } 
    

    然后缩放图表的宽度和高度

    【讨论】:

      猜你喜欢
      • 2012-03-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-11-28
      • 1970-01-01
      • 1970-01-01
      • 2021-03-14
      • 1970-01-01
      相关资源
      最近更新 更多