我们都知道太阳系是以太阳为中心的,和所有受到太阳的引力约束天体的集合体。包括八大行星(由离太阳从近到远的顺序:水星、金星、地球、火星、木星、土星、天王星、海王星),而我用html和css所写的就是八大行星和太阳组成的星系,比较简易,代码如下:
<!doctype html> <html> <head> <meta charset="utf-8"> <meta name="author" content="http://www.softwhy.com/" /> <title></title> <style> * { padding: 0; margin: 0; } body { width: 100%; height: 100%; background-color: #9370DB; } ul { height: 600px; width: 600px; margin: 50px auto; list-style: none; /* background: red; */ } ul li { /* 在页面的中间呈现 */ position: absolute; top: 50%; left: 50%; transform: translat