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.
我想制作一个居中(水平和垂直)的 div。它应该随屏幕改变大小,但周围有 5 个像素的边距。
#thediv { position: absolute; top: 10px; right: 10px; bottom: 10px; left: 10px; }