web_bigevent

105 阅读1分钟

CSS属性

background-size

image.png

transform: translate(-50%, -50%);

  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

image.png

JS+jquery

localStorage用法小总结
localStorage.setItem('token键key', res.token)

//当前页面打开URL页面
location.href = '/index.html'
//jquery选择器找到父节点通过属性来查找
$('.reg-box [name=password]').val()
$('#form_reg [name=username]').val()

// 注意:每次调用 $.get() 或 $.post() 或 $.ajax() 的时候,
// 会先调用 ajaxPrefilter 这个函数
// 在这个函数中,可以拿到我们给Ajax提供的配置对象
$.ajaxPrefilter(function(options) {
// 在发起真正的 Ajax 请求之前,统一拼接请求的根路径
  options.url = 'http://ajax.frontend.itheima.net' + options.url
  options.url = 'http://www.liulongbin.top:3007' + options.url
  }