Tailwind CSS:精心設計導覽設計
P粉515066518
P粉515066518 2024-02-26 16:48:59
0
1
307

我是 CSS 和 VueJs 新手,所以我正在建立選項卡面板設計 功能

目前,我正在使用 tailwind CSS 外掛程式

我想要的設計是這樣的:

目前:CodePen

我無法複製這個願望,因為我錯過了:

  • 元素之間的空格:我嘗試使用 flex space-x-10grid grid-gap-20 但它不起作用
  • 背景為灰色:我在 <nav> 內使用 bg-gray-600 進行嘗試,但是 原因而非結果
  • 點擊時更改所選標籤

P粉515066518
P粉515066518

全部回覆(1)
P粉764785924

你可以做的是直接在CSS中更改你的導航,使用:

nav {
    width: max-content; /*This gonna set a fixed width, it is necessary*/
    display: flex;
    gap: 20px; /*increase as much you want to stay like your template, it is the space between the elements in your flex*/
    background: #ccc; /*Just put your color directly*/
    border-radius: 20px; /*Just put your radius*/;
}
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!