Web Notes

JavaScript

获取参数

params = function(k) {
  return new URLSearchParams(location.search).get(k);
}

CSS

全尺寸背景

body {
  background: url(https://source.unsplash.com/random/640x360?travel&sig=huluren) no-repeat center center fixed;
  background-size: cover;
}