2020-08-18 htmlお気に入りタグ+ CSS雨アニメーション+ JSキャンセルの約束+ソフトスキルスキャンコードログインの原則とプロセス

2020-08-17トピックのソース:http://www.h-camel.com/index.html

[html] htmlのどのタグが一番好きですか。どうして?

メタ

[css] css3を使用して雨のアニメーションの効果を作成します

線形グラデーション、シャドウ、ズームで雨のアニメーションを実現

https://www.imooc.com/article/279422

[js]約束をキャンセルする方法

1.拒否

function hello() {
  let _res, _rej: any;

  const promise = new Promise((res, rej) => {
    _res = res;
    _rej = rej;
    setTimeout(() => {
      res("hello world");
    }, 5000);
  });
  return {
    promise,
    abort: (opt = {}) => {
      _rej({
        name: "abort",
        message: "the promise is aborted",
        aborted: true,
        ...opt
      });
    }
  };
}

const { promise, abort } = hello();
promise.then(console.log).catch(e => {
  console.log(e);
});

abort();

2.Promise.race

const promise = new Promise(function(res) {
  setTimeout(res, 5000, "hello world");
});

const abort = new Promise(function(_, _abort) {
  _abort({
    name: "abort",
    message: "the promise is aborted",
    aborted: true
  });
});

Promise.race([promise, abort])
  .then(console.log)
  .catch(e => {
    console.log(e);
  });

【ソフトスキル】コードログインのスキャンの原理と手順を教えてください

記事が完成しました:スキャンコードログインの実現原理https://blog.csdn.net/chenssy/article/details/103839484

おすすめ

転載: blog.csdn.net/vampire10086/article/details/108491451
おすすめ