Box

一个白 box,包含所有

box 元素就是一个具有白色背景、一些内边距(padding)和 box 阴影的简单容器。

示例

我在一个 box 里面。

HTML

<div class="box">
  我在一个 box 里面。
</div>

因为它就是一个容器,所有您可以很容易的放入其他组件,如表单元素

示例

HTML

<form class="box">
  <div class="field">
    <label class="label">Email</label>
    <div class="control">
      <input class="input" type="email" placeholder="e.g. alex@example.com">
    </div>
  </div>

  <div class="field">
    <label class="label">Password</label>
    <div class="control">
      <input class="input" type="password" placeholder="********">
    </div>
  </div>

  <button class="button is-primary">Sign in</button>
</form>

或者一个 media 对象:

示例

Image

John Smith @johnsmith 31m
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean efficitur sit amet massa fringilla egestas. Nullam condimentum luctus turpis.

HTML

<div class="box">
  <article class="media">
    <div class="media-left">
      <figure class="image is-64x64">
        <img src="https://railsway.cn/bulma/images/placeholders/128x128.png" alt="Image">
      </figure>
    </div>
    <div class="media-content">
      <div class="content">
        <p>
          <strong>John Smith</strong> <small>@johnsmith</small> <small>31m</small>
          <br>
          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean efficitur sit amet massa fringilla egestas. Nullam condimentum luctus turpis.
        </p>
      </div>
      <nav class="level is-mobile">
        <div class="level-left">
          <a class="level-item" aria-label="reply">
            <span class="icon is-small">
              <i class="fas fa-reply" aria-hidden="true"></i>
            </span>
          </a>
          <a class="level-item" aria-label="retweet">
            <span class="icon is-small">
              <i class="fas fa-retweet" aria-hidden="true"></i>
            </span>
          </a>
          <a class="level-item" aria-label="like">
            <span class="icon is-small">
              <i class="fas fa-heart" aria-hidden="true"></i>
            </span>
          </a>
        </div>
      </nav>
    </div>
  </article>
</div>

Variables #

Name
Type
Value
Computed Value
Computed Type
$box-color
variable
$text
hsl(0, 0%, 29%)
color
$box-background-color
variable
$scheme-main
hsl(0, 0%, 100%)
color
$box-radius
variable
$radius-large
6px
size
$box-shadow
variable
$shadow
0 0.5em 1em -0.125em rgba($scheme-invert, 0.1), 0 0px 0 1px rgba($scheme-invert, 0.02)
shadow
$box-padding
size
1.25rem
$box-link-hover-shadow
shadow
0 0.5em 1em -0.125em rgba($scheme-invert, 0.1), 0 0 0 1px $link
$box-link-active-shadow
shadow
inset 0 1px 2px rgba($scheme-invert, 0.2), 0 0 0 1px $link

Made with Bulma 此页面为开放源码页面。 发现排版问题?或者表达模糊?
在 GitHub 改进该页内容

#native_company# #native_desc#
#native_cta#

简讯 功能、版本、展柜……实时新闻滚动发布!