網頁排版中如何實現「卡片等高」是一個相當常見的需求。由於後端所給的資料內容長短不一,加上也有可能因為字體而導致換行 … 等因素,直接寫死高度並不是個好作法。這邊筆記下用 Grid 搭配 items-strech 屬性來完成。
內容
程式碼
https://stackblitz.com/edit/stackblitz-starters-tsnntnma?embed=1&file=index.html&view=preview
按讚加入粉絲團點數旅行 留學 信用卡 程式學習
網頁排版中如何實現「卡片等高」是一個相當常見的需求。由於後端所給的資料內容長短不一,加上也有可能因為字體而導致換行 … 等因素,直接寫死高度並不是個好作法。這邊筆記下用 Grid 搭配 items-strech 屬性來完成。
https://stackblitz.com/edit/stackblitz-starters-tsnntnma?embed=1&file=index.html&view=preview
按讚加入粉絲團