[英]can't change colour of js node text
On svg
text
nodes, you'll have to use fill
instead of color
: 在
svg
text
节点上,您必须使用fill
而不是color
:
.node text { font: 12px sans-serif; fill: red; }
<svg width="960" height="500"> <g transform="translate(100,20)"> <g class="node" transform="translate(0,10)"> <text x="-13" dy=".35em" text-anchor="end" style="fill-opacity: 1;">Product</text> </g> </g> </svg>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.