切换布局
显示结果
<!DOCTYPE html> <html> <head> <script type = "text/javascript" src = "https://cdn.jsdelivr.net/npm/d3@7"></script> </head> <body> <h2 class = "myclass">Message</h2> <div class = "myclass"> Hello World! </div> <script> d3.selectAll(".myclass").attr("style", "color: red"); </script> </body> </html>