【问题标题】:How to make the font of an HTML button bigger with CSS如何使用 CSS 使 HTML 按钮的字体更大
【发布时间】:2022-01-03 02:32:32
【问题描述】:

我正在尝试创建一个没有背景颜色和黑色字体边框的问号按钮,但是,尽管我在字体大小上写了什么,但按钮并没有变大,有人可以帮助我如何实现这一点?另外,onclick 我希望按钮有一个带有定义的文本框,如果您也可以让我了解如何做到这一点,那么我假设 JavaScript 将是完美的。谢谢! :)

.btn{
    background-color:rgba(252, 252, 252,0);
    border: 0 none;
    color:rgb(0,164,224);
    font-weight: 800;
    font-size: 60;
    size: 300px;
    -webkit-text-stroke: 2px black;}
 html:

<button class="btn" id="button?">?</button>

【问题讨论】:

  • 您应该使用font-size: 60%font-size: 60px。您还可以使用例如 rem、em、vh、vw。

标签: javascript php html css excel


【解决方案1】:

您忘记添加 px

.btn{
    background-color:rgba(252, 252, 252,0);
    border: 0 none;
    color:rgb(0,164,224);
    font-weight: 800px;
    font-size: 60px;
    size: 300px;
    -webkit-text-stroke: 2px black;}
html:

<button class="btn" id="button?">?</button>

【讨论】:

  • 哦?‍♀️谢谢你:)
猜你喜欢
  • 1970-01-01
  • 2019-05-02
  • 2020-08-21
  • 2017-11-24
  • 2011-06-22
  • 2011-02-01
  • 1970-01-01
  • 2014-03-06
相关资源
最近更新 更多