Grid Row Start / End - Tailwind CSS
Có thể bạn quan tâm
| Class | Styles |
|---|---|
| row-span-<number> | grid-row: span <number> / span <number>; |
| row-span-full | grid-row: 1 / -1; |
| row-span-(<custom-property>) | grid-row: span var(<custom-property>) / span var(<custom-property>); |
| row-span-[<value>] | grid-row: span <value> / span <value>; |
| row-start-<number> | grid-row-start: <number>; |
| -row-start-<number> | grid-row-start: calc(<number> * -1); |
| row-start-auto | grid-row-start: auto; |
| row-start-(<custom-property>) | grid-row-start: var(<custom-property>); |
| row-start-[<value>] | grid-row-start: <value>; |
| row-end-<number> | grid-row-end: <number>; |
| -row-end-<number> | grid-row-end: calc(<number> * -1); |
| row-end-auto | grid-row-end: auto; |
| row-end-(<custom-property>) | grid-row-end: var(<custom-property>); |
| row-end-[<value>] | grid-row-end: <value>; |
| row-auto | grid-row: auto; |
| row-<number> | grid-row: <number>; |
| -row-<number> | grid-row: calc(<number> * -1); |
| row-(<custom-property>) | grid-row: var(<custom-property>); |
| row-[<value>] | grid-row: <value>; |
Examples
Spanning rows
Use row-span-<number> utilities like row-span-2 and row-span-4 to make an element span n rows:
Starting and ending lines
Use row-start-<number> or row-end-<number> utilities like row-start-2 and row-end-3 to make an element start or end at the nth grid line:
These can also be combined with the row-span-<number> utilities to span a specific number of rows.
Using a custom value
Use utilities like row-[<value>],row-span-[<value>],row-start-[<value>], and row-end-[<value>] to set the grid row size and location based on a completely custom value:
<div class="row-[span_16_/_span_16] ..."> <!-- ... --></div>For CSS variables, you can also use the row-(<custom-property>) syntax:
<div class="row-(--my-rows) ..."> <!-- ... --></div>This is just a shorthand for row-[var(<custom-property>)] that adds the var() function for you automatically.
Responsive design
Prefix grid-row,grid-row-start, and grid-row-end utilities with a breakpoint variant like md: to only apply the utility at medium screen sizes and above:
<div class="row-span-3 md:row-span-4 ..."> <!-- ... --></div>Learn more about using variants in the variants documentation.
Từ khóa » Html Css Grid Row Height
-
CSS Grid-template-rows Property - W3Schools
-
Grid-template-rows - CSS: Cascading Style Sheets - MDN Web Docs
-
Grid-auto-rows - CSS: Cascading Style Sheets - MDN Web Docs
-
How Do I Specify Row Heights In CSS Grid Layout? - Stack Overflow
-
Grid-template-rows | CSS-Tricks
-
A Complete Guide To Grid - CSS-Tricks
-
Grid Row Height Css Code Example - Code Grepper
-
Define Grid Element Height And Width - OpenClassrooms
-
CSS Grid #12: The Minmax() Function - Joomlashack
-
CSS Grid-template-rows Property - W3docs
-
CSS | Grid-template-rows Property - GeeksforGeeks
-
Css Grid Not Taking Full Row Height - MaxInterview
-
Grid Cheatsheet
-
JavaScript Data Grid: Grid Size - AG Grid