如何居中显示:内联块?

时间:2014-12-23 13:52:33

标签: center css

我创建了这样的按钮:

http://jsfiddle.net/ry4r8emy/3/

<a href="#"><div class="button">Become VIP now!</div></a>


.button {
    margin: 0 auto;
    display: inline-block;
    font-size: 22px;
    font-family: 'Raleway', sans-serif;
    text-align: center;
    line-height: 1.42857143;
    white-space: nowrap;
    vertical-align: middle;
    padding: 10px 15px;
    background-color: rgba(61, 61, 61, 0.99);
    background-image: url("../images/bg.png");
    background-position: 0 100px;
    text-decoration: none;
    color: rgba(236, 236, 236, 0.99);
    -webkit-transition: 500ms linear;
    -moz-transition: 500ms linear;
    -o-transition: 500ms linear;
    -ms-transition: 500ms linear;
    transition: 500m linear; 

由于某种原因,保证金:汽车无法使其居中......

请帮帮我。

0 个答案:

没有答案