由于某种原因,此<a>
标记将不会与水平中心对齐。为了解决这个问题需要做些什么?HTML5 <a>元素不居中
.button {
\t display: inline-block;
\t position: relative;
\t padding: 10px 60px;
\t
\t background-color: transparent;
\t border: 3px solid black;
\t color: black;
\t text-decoration: none!important;
\t text-align: center;
\t text-indent: 15px;
}
.button:before, .button:after {
\t content: ' ';
\t display: block;
\t position: absolute;
\t left: 10px;
\t top: 52%;
}
/* box shape */
.button:before {
\t width: 20px;
\t height: 4px;
\t border-style: solid;
\t border-width: 0 4px 4px;
}
<a href="#" class="button">demo</a>
文本缩进? – sol
你可以把''text-align:center''放在包含块(本例中是body) – Orangesandlemons