A: position(), top, left
B: offset(), top, left
position(), top, right offset(), top, right
举一反三
- 下列对position属性的值的描述错误的是?() A: static(默认),按照正常文档流进行排列 B: relative(相对定位),不脱离文档流,相对于自身静态位置通过top,bottom,left,right来定位 C: absolute(绝对定位),脱离文档流,相对于自身父级元素位置通过top,bottom,left,right来定位 D: fixed(固定定位),脱离文档流,相对于浏览器窗口通过top,bottom,left,right来定位
- offset()方法在设置元素位置时必须包含left和top属性。()
- 通过()属性设置元素的边偏移。 A: top B: bottom C: left D: right
- offset()方法在设置元素位置时必须包含left或top属性。() A: 对 B: 错
- 使用CSS的position属性进行定位时()表示和右边缘的距离 A: top B: right C: bottom D: left
内容
- 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的取值决定