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 特性
  • 相关阅读:
    MSSQL如何将查询结果拼接成字符串
    SQL删除指定条件的重复数据,只保留一条
    清除日志
    jsp使用
    Eclipse使用
    SSM框架开发遇到的问题
    SpringMvc学习
    大中华~~汉字
    Word技巧设置
    AWS-资源访问慢分析
  • 原文地址:https://www.cnblogs.com/shmily-code/p/8549938.html
Copyright © 2011-2022 走看看