国产chinesehdxxxx野外,国产av无码专区亚洲av琪琪,播放男人添女人下边视频,成人国产精品一区二区免费看,chinese丰满人妻videos

Tailwind CSS Justify Self

2022-08-08 10:05 更新

Justify Self

用于控制單個(gè)網(wǎng)格項(xiàng)如何沿其內(nèi)聯(lián)軸對(duì)齊的功能類。

Class
Properties
justify-self-auto justify-self: auto;
justify-self-start justify-self: start;
justify-self-end justify-self: end;
justify-self-center justify-self: center;
justify-self-stretch justify-self: stretch;

Auto

使用 ?justify-self-auto? 根據(jù)網(wǎng)格的 ?justify-items? 屬性的值來(lái)對(duì)齊一個(gè)項(xiàng)目:


<div class="grid justify-items-stretch ...">
  <!-- ... -->
  <div class="justify-self-auto ...">1</div>
  <!-- ... -->
  <!-- ... -->
  <!-- ... -->
  <!-- ... -->
</div>

Start

使用 ?justify-self-start? 將網(wǎng)格項(xiàng)沿內(nèi)聯(lián)軸起點(diǎn)對(duì)齊:


<div class="grid justify-items-stretch ...">
  <!-- ... -->
  <div class="justify-self-start ...">1</div>
  <!-- ... -->
  <!-- ... -->
  <!-- ... -->
  <!-- ... -->
</div>

Center

使用 ?justify-self-center? 將網(wǎng)絡(luò)項(xiàng)沿其內(nèi)聯(lián)軸的中心對(duì)齊。


<div class="grid justify-items-stretch ...">
  <!-- ... -->
  <div class="justify-self-center ...">1</div>
  <!-- ... -->
  <!-- ... -->
  <!-- ... -->
  <!-- ... -->
</div>

End

使用 ?justify-self-end? 將網(wǎng)格項(xiàng)沿內(nèi)聯(lián)軸終點(diǎn)對(duì)齊:


<div class="grid justify-items-stretch ...">
  <!-- ... -->
  <div class="justify-self-end ...">1</div>
  <!-- ... -->
  <!-- ... -->
  <!-- ... -->
  <!-- ... -->
</div>

Stretch

使用 ?justify-self-stretch? 來(lái)拉伸一個(gè)網(wǎng)格項(xiàng),以填充其內(nèi)聯(lián)軸上的網(wǎng)格區(qū)域。


<div class="grid justify-items-start ...">
  <!-- ... -->
  <div class="justify-self-stretch ...">1</div>
  <!-- ... -->
  <!-- ... -->
  <!-- ... -->
  <!-- ... -->
</div>

響應(yīng)式

要在特定的斷點(diǎn)處控制網(wǎng)格項(xiàng)在其網(wǎng)格區(qū)域內(nèi)的對(duì)齊,可以在任何現(xiàn)有的功能類前添加 ?{screen}:? 前綴。例如,使用 ?md:justify-self-end? 來(lái)僅在中等尺寸及以上的屏幕應(yīng)用 ?justify-self-end? 功能。

關(guān)于 Tailwind 的響應(yīng)式設(shè)計(jì)功能的更多信息,請(qǐng)查看 響應(yīng)式設(shè)計(jì) 文檔。

自定義

變體

默認(rèn)情況下, 針對(duì) justify-self 功能類,只生成 responsive 變體。

您可以通過(guò)修改您的 ?tailwind.config.js? 文件中的 ?variants ?部分中的 ?justifySelf ?屬性來(lái)控制為 justify-self 功能生成哪些變體。

例如,這個(gè)配置也將生成 hover and focus 變體:

  // tailwind.config.js
  module.exports = {
    variants: {
      extend: {
        // ...
       justifySelf: ['hover', 'focus'],
      }
    }
  }

禁用

如果您不打算在您的項(xiàng)目中使用 justify-self 功能,您可以通過(guò)在配置文件的 ?corePlugins ?部分將 ?justifySelf ?屬性設(shè)置為 ?false ?來(lái)完全禁用它們:

  // tailwind.config.js
  module.exports = {
    corePlugins: {
      // ...
     justifySelf: false,
    }
  }


以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)