zoukankan      html  css  js  c++  java
  • 前端面试整理

    1,jquery的attr()和prop()的区别?

     a:对于HTML元素本身就带有的固有属性,在处理时,使用prop方法。
     b:对于HTML元素我们自己自定义的DOM属性,在处理时,使用attr方法。
     
    •.attr( attributeName, value ) •.attr( attributeName, value )
    •.attr( attributes )
    •.attr( attributeName, function(index, attr) )
     
    •.prop( propertyName, value ) •.prop( propertyName, value )
    •.prop( properties )
    •.prop( propertyName, function(index, oldPropertyValue) )
     
     
    2,元素水平居中
    a,绝对定位的元素水平居中
    .center {

    position: absolute; /*绝对定位*/
    500px;
    height:300px;
    background: red;
    margin: 0 auto; /*水平居中*/
    left: 0; /*此处不能省略,且为0*/
    right: 0; /*此处不能省略,且为0*/

    }
     
    3,display属性的取值有哪些,分别是什么含义?
    none:此元素不显示。 
    block:将元素显示为块级元素,前后会带换行符。 
    inline:默认值,元素会被显示为内联元素,前后没有换行符。 
    inline-block:行内块级元素。
     
    4,css3新特性
    a,css3选择器
    b,@Font-face 特性
  • 相关阅读:
    gcc各个版本下载
    加减法运算解决乘除法
    蚂蚁碰撞的概率
    ns2.34移植leach协议
    ubantu16.04安装ns2.34 错误
    ubantu安全卸载火狐浏览器
    post和get的区别
    docker加速配置阿里云镜像
    重装系统后,会因为本机保存的公匙不对报错
    集合 set
  • 原文地址:https://www.cnblogs.com/shmily-code/p/8549938.html
Copyright © 2011-2022 走看看