【发布时间】:2015-04-02 06:43:24
【问题描述】:
我正在尝试将content: "+"; 垂直和水平居中。垂直地,我已经能够使用 line-height 来实现这一点。
但是在水平方向上,我尝试使用绝对定位,然后用边距减去。但是没用……
这就是我所拥有的:
html body div.body-container form div#composite-field button#fes-submit {
position: absolute; float: none; clear: both; top: 0; right: 5%;
width: 80px; height: 100px; margin: 0; padding: 0; font-size: 42px;
border: 0; border-radius: 0; outline: none; -webkit-appearance: none;
background-color: #2e4856; color: #eab94e;
z-index: 20;
}
html body div.body-container form div#composite-field button#fes-submit:before {
content: "+"; line-height: 100px; float: left;
font-family: "Open Sans", sans-serif; font-weight: 700; font-size: 42px; letter-spacing: normal;
}
有什么想法吗?
【问题讨论】:
标签: css