如何增加字体大小?

时间:2015-06-30 18:46:22

标签: html css html5

我正在编辑一个网站模板,其中有一个按钮类的css。

.button {
    -moz-appearance: none;
    -webkit-appearance: none;
    -o-appearance: none;
    -ms-appearance: none;
    appearance: none;
    -moz-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
    -webkit-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
    -o-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
    -ms-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
    background-color: transparent;
    border-radius: 0.35em;
    border: solid 3px #efefef;
    color: #787878 !important;
    cursor: pointer;
    display: inline-block;
    font-weight: 400;
    height: 6.15em;
    height: calc(2.75em + 6px);
    line-height: 2.75em;
    min-width: 20em;
    padding: 0 1.5em;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    margin:10px;

}

我正在尝试增加其中的字体。尝试使用行高和高度的值,但无法增加字体大小。有什么想法吗?

4 个答案:

答案 0 :(得分:1)

尝试font-size:__px无论像素值是什么

答案 1 :(得分:1)

我刚刚将 font-size 属性添加到CSS中。有效。漂亮的基础:P

答案 2 :(得分:1)

您需要做的就是使用CSS font-size属性:

#yourdiv{
    font-size:20px;
}

答案 3 :(得分:0)

添加:

size: 20px;

或:

font-size: 20px;
相关问题