d3绘制树形结构
代码语言:html
所属分类:布局界面
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
@import url("https://fonts.googleapis.com/css?family=Mountains+of+Christmas:700|Roboto+Mono:400,700&display=swap");
* {
box-sizing: border-box;
padding: 0;
margin: 0;
}
body {
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' opacity='0.15' viewBox='-50 -50 100 100'%3E%3Cg stroke='%2300B0E3' stroke-width='2' fill='none'%3E%3Cpath d='M -20 -20 l 40 40 m -40 0 l 40 -40' /%3E%3C/g%3E%3C/svg%3E"), hsl(220, 90%, 10%);
background-size: 20px, 100%;
color: hsl(0, 0%, 95%);
font-family: "Roboto Mono", monospace;
}
/* limit the width of the #root container */
#root {
max-width: 1000px;
width: 90vw;
margin: 1rem auto;
padding: 1rem;
}
/* limit the width of the svg, so to have the text of the accompanying div wrap around it */
#root svg {
max-width: 550px;
width.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0