切换布局
显示结果
<!DOCTYPE html> <html> <head> <script type = "text/javascript" src = "https://cdn.jsdelivr.net/npm/d3@7"></script> <style> body { font-family: Arial; } </style> </head> <body> <div id = "svgcontainer"> <svg width = "300" height = "300"> <g transform = "translate(60,60) rotate(30)"> <rect x = "20" y = "20" width = "60" height = "60" fill = "green"> </rect> <circle cx = "0" cy = "0" r = "30" fill = "red"/> </g> </svg> </div> </body> </html>