發表文章

目前顯示的是 4月, 2020的文章

[Bootstrap] 超簡單 Bootstrap 表格 (table) ( ver. 3.3.7為例)

圖片
W3 Bootstrap table 介紹 <div class="container">     <table class="table table-bordered table-condensed" style="table-layout: fixed;">         <tr class="info">             <th class="text-center" colspan="2">測試表格</th>         </tr>         <tr class="active">             <th class="text-center">會員名稱</th>             <th class="text-center">消費金額</th>         </tr>         <tr>             <td>Allen</td>             <td class="text-right">12,000</td>         </tr>         <tr>             <td>Billy</td>       ...

[CSS] 使用 "強制換頁" page-break-after:always 的注意事項 (chrome, IE 的差異)

圖片
當我們幫一個html元素加上 page-break-after: always 這個CSS屬性,就代表當我們列印時,在這元素後要強制換頁,但要注意這個屬性只能加在區塊元素,且不能加在 空的div元素上。(參考來源: MDN web docs ) 正確用法: <div style="page-break-after: always;">內容內容內容</dv> 錯誤用法:(在空元素上使用) <div style="page-break-after: always;"></dv> 錯誤用法:(在行內元素上使用) <br style="page-break-after: always;"> *這種用法在 IE 瀏覽器上會有換頁效果,但在其它瀏覽器(例如: chrome)上是沒有作用的。