问题收集

1.块元素水平垂直居中。

//样例块元素:
<div class="box1 box2 box3"></div>
//基础样式:
div{
  width: 200px;
  height: 200px;
  background: #777;
}

//方法一: 
.box1{
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -100px;
  margin-left: -100px;
}

//方法二:
.box2{
  margin: auto;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

//方法三,使用jQuery,js也可
$(window).resize(function(){
  $(".box3").css({
     position: "absolute",
     left: ($(window).width() - $(".box3").outerWidth())/2,
     top: ($(window).height() - $(".box3").outerHeight())/2
  });        
});//页面载入或窗口改变时都需要调用此方法
$(function(){
  $(window).resize();
});

2.三个盒子,左右定宽,中间自适应,要求先加载中间块。

3.浮动的方法,清除浮动方法

4.css sprites定义和使用

5.用原生js给一个按钮绑定两个onclick事件

6.js中的定时器

7.ajax

//(1)创建异步对象
var ajax = new XMLHttpRequest();

//(2)设置请求的url参数(请求的类型;请求的url)
ajax.open('get', url);

//(3)发送请求
ajax.send();

//(4)注册事件onreadystatechange,状态改变时执行
ajax.onreadystatechange = function () {
  if (ajax.readyState===4 && ajax.status===200) {
    //(5)数据请求成功,且请求的页面是存在
   console.log(ajax.responseText);//输入相应的内容
 }
}

8.js的数据类型,其中undefined和null的区别

9.mvvm和mvc

10.px和em

11.优雅降级和渐进增强

————以上来源————
https://blog.csdn.net/zhang6223284/article/details/82843437
https://blog.csdn.net/weixin_43624724/article/details/86519903

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值