题解 | #圣诞树#
圣诞树
https://www.nowcoder.com/practice/4924913926d94e96a70bbf2a50847852
{"html":"\r\n <!DOCTYPE html>\r\n<html>\r\n <head>\r\n <meta charset=utf-8>\r\n <style type=\"text/css\">\r\n .topbranch {\r\n width: 0px;\r\n height: 0px;\r\n /*\r\n * TODO: 上枝叶效果\r\n */\r\n float: left;\r\n border-bottom: 100px solid green;\r\n border-top: 100px solid transparent;\r\n border-left:100px solid transparent;\r\n border-right:100px solid transparent;\r\n margin-left: 100px;\r\n }\r\n .middleBranch {\r\n width: 0px;\r\n height: 0px;\r\n /*\r\n * TODO: 中枝叶效果\r\n */\r\n border-top: 200px solid transparent;\r\n border-bottom: 200px solid green;\r\n border-left:200px solid transparent;\r\n border-right:200px solid transparent;\r\n }\r\n .base {\r\n /*\r\n * TODO: 树干效果\r\n */\r\n float: left;\r\n height: 200px;\r\n width: 70px;\r\n background-color: gray;\r\n margin-left: 165px;\r\n }\r\n </style>\r\n </head>\r\n <body>\r\n \t<section class=\"topbranch\"></section>\r\n <section class=\"middleBranch\"></section>\r\n <section class=\"base\"></section>\r\n </body>\r\n</html>\r\n\r\n ","css":"/* html, body {\\n\\twidth: 100%;\\n\\theight: 100%;\\n\\tmargin: 0;\\n\\tpadding: 0;\\n} */","js":"// 请在这里输入代码"}