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
我测试过:
style="position:fixed;top:50%;left:50%;"
但是 div 的左上角在中心,我不想把负边距值让他反应
我如何解决这个问题
要在中心使用固定 div,
style="margin: 0 auto;"
它将在中心对齐 div。