• 2022-06-06
    如果想要获取元素相对于浏览器窗口的偏移距离,应该用_____方法来实现。该方法有两个属性,分别是_____和_____。(
    A: position(), top, left
    B: offset(), top, left
    position(), top, right offset(), top, right
  • B

    内容

    • 0

      标签定位在距其父标签左边50px,上边100px的CSS正确写法是( ) A: {position:static;left:50px;top:100px} B: {position:relative;left:50px;top:100px} C: {position:absolute;left:50px;top:100px} D: {position:fixed;left:50px;top:100px}

    • 1

      In css style, the meaning of background-position:-10px 20px is ( ) A: The background<br/>picture is offset by 10px to the left and 20px to the down B: The background<br/>picture is offset by 10px to the left and 20px to the top C: The background<br/>picture is offset by 10px to the right and 20px to the down D: The background<br/>picture is offset by 10px to the right and 20px to the upper

    • 2

      在使用offset()方法获取元素的坐标时,如果元素的display属性值为none,那么获取的left或top值为______

    • 3

      设置position属性为相对定位时,left/top属性将有效。

    • 4

      position属性设定,表示定位的参照物是哪个元素;而定位位置则由top,bottom,left,right的取值决定