分類

展開全部 | 收合全部

分類

展開全部 | 收合全部

【WordPress #3】wordpress 調整文章內表格顏色, 格式 的方法 (markdown 也適用) modify table color, format (內附範例 css 程式碼) sample code

前言

這篇是因為我在調整我自己網站時,
發現表格怎麼樣用都很醜,
後來認真的研究該怎麼辦的研究成果。

  • 原來的樣子

有沒有看到表格都不見了!!!

範例程式碼

引用自: https://www.techiestuffs.com/styling-tables-using-css-in-wordpress-theme/

table {
background: #fff;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
border: 1px solid #ddd;
margin:auto;
  }

 table thead, table tfoot { background: #f5f5f5; }
 table thead tr th,
 table tfoot tr th,
 table tbody tr td,
 table tr td,
 table tfoot tr td { font-size: 12px; line-height: 18px; text-align: left; }
 table thead tr th,
 table tfoot tr td { padding: 8px 10px 9px; font-size: 14px; font-weight: bold; color: #222; }
 table thead tr th:first-child, table tfoot tr td:first-child { border-left: none; }
 table thead tr th:last-child, table tfoot tr td:last-child { border-right: none; }

      table tbody tr.even,
      table tbody tr.alt { background: #f9f9f9; }
      table tbody tr:nth-child(even) { background: #f9f9f9; }
      table tbody tr td { color: #333; padding: 9px 10px; vertical-align: top; border: none; }

將上面這段程式碼加入在自己的外觀設定的 css 裡面

在外觀的這邊

直接貼上後發布

結果

  • 直接給大家看吧XD (我有自己再稍微調整一下)
指令功能簡述補充說明
cd切換資料夾記法:change directory
ls查看資料夾內檔案(只有檔名)
ll 或 ls -l查看資料夾內檔案(完整資訊)
pwd查看目前路徑

想學習怎麼改,可以參考: https://www.w3schools.com/css/css_table.asp

至於這段內容在哪XD,在我的這篇文當中:

【Linux 基礎指令 #0】linux/ubuntu/mac 基礎終端機 (terminal) 指令 & 基礎知識總整理,初學者/新手 必須知道的基礎指令 & 基礎知識大全(持續更新)

Reference

Styling Tables using CSS in WordPress Theme


https://www.w3schools.com/css/css_table.asp
https://www.w3schools.com/css/tryit.asp?filename=trycss_table_fancy

⭐WordPress 相關文章整理⭐:
1.【WordPress】建立/架一個網站大概要花多少錢? 與個人建立網站心態分享 (以我的 wordpress 網站為例,持續更新) How Much Does It Cost to Build a WordPress Website?
2.【WordPress】wordpress 初學者尋找特定選單的編輯位置
3.【WordPress】wordpress 初學者建立文章縮圖的方法
4.【WordPress】wordpress 調整文章內表格顏色, 格式 的方法 (markdown 也適用) modify table color, format (內附範例 css 程式碼) sample code
5.【WordPress】Bug & 問題解決: wordpress 引用文章/文章連結 時 縮圖壞掉/破圖/沒有顯示縮圖 ,分享文章到 facebook 時 縮圖壞掉/破圖/沒有顯示縮圖 (附例圖)
6.【WordPress】Bug & 問題解決: 使用 markdown 撰寫文章後,編輯時全部變回 html 格式
7.【Wordpress】如何放置 google slides (powerpoint, ppt, 簡報) 在 wordpress 的文章中直接顯示
8.【WordPress】如何利用 Rank Math SEO 提交 sitemap (圖文說明)
⭐Google AdSense 相關文章整理⭐:
1.【Google AdSense】申請 Google AdSense 如何設置 ads.txt (內附圖文說明)
2.【Google AdSense】問題解決: 申請 Google AdSense 卡在「我們正在為你完成設定」 後一直沒有變化 (內含圖文說明)
3.【Google AdSense】問題解決: 「收益警示:您必須修正某些 ads.txt 檔案問題,以免造成嚴重的收益損失。」
4.【Google AdSense】問題解決: 很抱歉造成您的不便,但是我們目前無法處理您的要求。我們已將此問題告知工程師,並會儘快加以解決。
⭐【喜歡我的文章嗎? 歡迎幫我按讚~ 讓基金會請創作者喝一杯咖啡!
如果喜歡我的文章,請幫我在下方【按五下Like】 (Google, Facebook 免註冊),會由 「LikeCoin」 贊助作者鼓勵繼續創作,讀者們「只需幫忙按讚,完全不用出錢」哦!

likecoin-steps
Howard Weng
Howard Weng

我是 Howard Weng,很多人叫我嗡嗡。這個網站放了我的各種筆記。希望這些筆記也能順便幫助到有需要的人們!如果文章有幫助到你的話,歡迎幫我點讚哦!
另外,因為定位是「個人的隨手筆記」,有些文章內容「⚠️可能我理解有誤⚠️」或「?只寫到一半?」,如果有發現這樣的情況,歡迎在該文章的最下面留言提醒我!我會儘快修正或補上!感謝大家的建議與幫忙,讓網站能變得更好?

文章: 890

★留個言吧!內容有誤或想要補充也歡迎與我討論!