// 1.选择d3.select('p')d3.selectAll('p')d3.select('.txt').style('color', '#fff')// 2.支持动态设置属性// a:随机属性d3.selectAll('p').style('color', function (d, i) { return 1 % 2 ? '#fff' : '#eee'})// b.将数组中的属性设置给元素d3.selectAll('p') .data([4, 8, 15, 16, 23, 42]) .s…