因此,我正在使用此代码:http://codepen.io/n7best/pen/EtFcH/
这是一个轮盘赌,我想让它(div .spinner
)在 bootstrap .col-lg-12
div 的中心。
我尝试了 text-align: center
、margin-left/right:auto
、margin-leftcalc(50%-29em)
但都没有似乎工作。我该怎么做?
最佳答案
你可以试试这个使相对元素居中:
.spinner {
left: 50%;
margin-left: -12.5em;
}
关于html - 中心位置 : relative div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35209317/