123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Document</title>
- <style>
- #nav {
- width: 1199px;
- height: 35px;
- line-height: 35px;
- background: #EEEEEE;
- }
- .left {
- float: left;
- }
- .right {
- float: right;
- }
- #nav a {
- text-decoration: none;
- color: #888888;
- font-family: PingFang SC;
- font-size: 12px;
- }
- #nav .active {
- color: #6F26BD;
- }
- </style>
- </head>
- <body>
- <div id="nav">
- <!-- 左边的 -->
- <div class="left">
- <a href="#">您好,欢迎进入包图购物网</a>
- <a href="#" class="active">注册</a>
- <a href="#">登录</a>
- </div>
- <!-- 右边的 -->
- <div class="right">
- <a href="#">设为首页 ☆</a>
- <a href="#" class="active">加入收藏</a>
- <a href="#">| 客户服务 </a>
- <a href="#">| 关注官方微博:</a>
- </div>
- </div>
- <script>
- // var x = 3;
- // function foo() {
- // var x = 1;
- // console.log(x); // 1
- // (function () {
- // var y = 2;
- // console.log(x); // 1
- // console.log(y); // 2
- // })();
- // console.log(y);
- // }
- // foo();
- // console.log(x);
- console.log(1);
- setTimeout(() => {
- console.log(2);
- Promise.resolve().then(() => {
- console.log(3);
- });
- });
- console.log(4);
- new Promise((resolve, reject) => {
- console.log(5);
- resolve();
- }).then(() => {
- console.log(6);
- setTimeout(() => {
- console.log(7);
- });
- });
- console.log(8);
- </script>
- </body>
- </html>
|