📜  bootstrap navbar logo center - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:23.642000             🧑  作者: Mango

代码示例1
Try this:

.navbar {
    position: relative;
}
.brand {
    position: absolute;
    left: 50%;
    margin-left: -50px !important;  /* 50% of your logo width */
    display: block;
}
Centering your logo by 50% and minus half of your logo width so that it won't have problem when zooming in and out.