1

这是我当前的 HTML,用于显示带有bulma.

<body>
  <div id="root">
    <nav class="navbar is-primary is-navbar-sticky">
    </nav>
    <section class="section">
      <div class="container">
        <form>
          <div class="field">
            <label class="label is-medium">
              "Title"
              <div class="control">
                  <input type="text" class="input is-medium is-danger" placeholder="Put the title of item here" required="" value="">
                  <p class="help is-danger">title's length should be equal or greater than 10. Current: 0</p>
              </div>
            </label>
          </div>
        </form>
      </div>
    </section>
  </div>
</body>

到目前为止,一切都很好。

一个问题是input每个断点都会占用全宽,这对于桌面分辨率来说太多了。

如何使input移动断点只需要全宽,而移动断点后可能需要一定宽度。

有没有bulma办法做到这一点?而不是编写我自己的css规则?

4

2 回答 2

0

您使用 bulma 框架因此分配 bulma 框架的网格系统,您可以在输入元素中使用类列,您可以使用您想要设置输入字段宽度的列

于 2017-10-30T07:22:26.187 回答
0

<div class="control"> <input type="text" class="input column-12 is-medium is-danger" placeholder="Put the title of item here" required="" value=""> <p class="help is-danger">title's length should be equal or greater than 10. Current: 0</p> </div>

于 2017-10-31T06:22:14.577 回答