谁能解释一下,为什么使用 relative是设置right,bottom 后,看不到div 呀,哪里多出来的 top , left 属性负值呀?
chrome 中修改后,
同样,设置 left,top 后, 多出来 right/bottom 的负值属性?
源码:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>CSS 定位:relative && absolute</title> <style> .relative{ background-color: #0f0; width: 100px; height: 100px; position: relative; right: 200px; bottom: 200px; } </style> </head> <body> <div> <div> <!-- --> </div> </div> </body> </html>
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>CSS 定位:relative && absolute</title> <style> .relative{ background-color: #0f0; width: 100px; height: 100px; position: relative; left: 200px; top: 200px; } </style> </head> <body> <div> <div> <!-- --> </div> </div> </body> </html>
UFO2015
UFO2015
qq_世界因你颤抖_0