问题 I'm using d3.js to generate some rects which are directly above one another, in this fashion: var greenRed = d3.select(".green-red").append("svg") .attr("height", 120); greenRed.append("rect") .attr("fill", "green") .attr("x", 0) .attr("y", 0) .attr("height", 50) .attr("width", 300); greenRed.append("rect") .attr("fill", "red") .attr("x", 0) .attr("y", 50) .attr("height", 50) .attr("width", 300); I've noticed that depending on which colours are stacked on top of one another, there is either a