【问题标题】:Button input width attribute not working按钮输入宽度属性不起作用
【发布时间】:2014-06-06 01:16:47
【问题描述】:

我的按钮代码不起作用。我的目标是让宽度更长,但它没有效果。这是其中的一个sn-p代码,错误应该是:

    <form action="http://kindust.com/test.html">
    <input type="submit" value="Shop" width="150">
    </form>

【问题讨论】:

  • 你什么也没做
  • 1.你想扩大什么范围? 2. 关闭您的输入标签。 3. 使用 CSS。
  • @Fiddles 酷,您可以将其添加到答案中。

标签: html css forms button input


【解决方案1】:

CSS

    .btn{
       width: 150px;
    }

HTML

<form action="http://kindust.com/test.html">
    <input class="btn" type="submit" value="Shop">
</form>

【讨论】:

  • 谢谢!现在工作正常!
  • 或者你可以跳过课程并使用input[type=submit]。无需一直为所有内容添加类。
猜你喜欢
  • 2018-08-22
  • 2011-01-22
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-10-07
  • 2014-11-09
  • 1970-01-01
  • 2014-04-11
相关资源
最近更新 更多