Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个盒子,上面写着“全新幻灯片”,我使用 css 代码将其定位到特定位置left: -40px;,如下图所示:
left: -40px;
但是当我调整浏览器的大小时,位置会中断,如下图所示:
如何解决这个问题?这样即使我调整浏览器的大小,框的位置也会相对调整自己?
当浏览器调整大小时,此 div 会自行调整:
http://jsfiddle.net/GolezTrol/fg9kL/