純CSS美化HTML的Table - 程式人生

文章推薦指數: 80 %
投票人數:10人

純CSS美化HTML的Table ... 今天發覺一個很好的表格CSS程式碼: ... >純CSS美化HTML的Table 純CSS美化HTML的Table 阿新••發佈:2019-02-07 今天發覺一個很好的表格CSS程式碼:http://veerle-v2.duoh.com/blog/comments/a_css_styled_table 整體的CSS程式碼: body{ font:normal11pxauto"TrebuchetMS",Verdana,Arial,Helvetica,sans-serif; color:#4f6b72; background:#E6EAE9; } a{ color:#c75f3e; } #mytable{ width:700px; padding:0; margin:0; } caption{ padding:005px0; width:700px; font:italic11px"TrebuchetMS",Verdana,Arial,Helvetica,sans-serif; text-align:right; } th{ font:bold11px"TrebuchetMS",Verdana,Arial,Helvetica,sans-serif; color:#4f6b72; border-right:1pxsolid#C1DAD7; border-bottom:1pxsolid#C1DAD7; border-top:1pxsolid#C1DAD7; letter-spacing:2px; text-transform:uppercase; text-align:left; padding:6px6px6px12px; background:#CAE8EAurl(images/bg_header.jpg)no-repeat; } th.nobg{ border-top:0; border-left:0; border-right:1pxsolid#C1DAD7; background:none; } td{ border-right:1pxsolid#C1DAD7; border-bottom:1pxsolid#C1DAD7; background:#fff; padding:6px6px6px12px; color:#4f6b72; } td.alt{ background:#F5FAFA; color:#797268; } th.spec{ border-left:1pxsolid#C1DAD7; border-top:0; background:#fffurl(images/bullet1.gif)no-repeat; font:bold10px"TrebuchetMS",Verdana,Arial,Helvetica,sans-serif; } th.specalt{ border-left:1pxsolid#C1DAD7; border-top:0; background:#f5fafaurl(images/bullet2.gif)no-repeat; font:bold10px"TrebuchetMS",Verdana,Arial,Helvetica,sans-serif; color:#797268; }整體的表格程式碼: -//W3C//DTDXHTML1.0Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> CSSTables Table1:PowerMacG5techspecs Configurations Dual1.8GHz Dual2GHz Dual2.5GHz Model M9454LL/A M9455LL/A M9457LL/A G5Processor Dual1.8GHzPowerPCG5 Dual2GHzPowerPCG5 Dual2.5GHzPowerPCG5 Frontsidebus 900MHzperprocessor 1GHzperprocessor 1.25GHzperprocessor Level2Cache 512Kperprocessor 512Kperprocessor 512Kperprocessor

→downloadstylesheet

我做了點改進,使用了CSS選擇器讓奇數行,偶數行顏色不一樣: .gradientTable{ width:auto; padding:0; border-spacing:0px; } .gradientTableth{ font:bold11px"TrebuchetMS",Verdana,Arial,Helvetica,sans-serif; color:#4f6b72; border-right:1pxsolid#C1DAD7; border-bottom:1pxsolid#C1DAD7; border-top:1pxsolid#C1DAD7; letter-spacing:2px; text-transform:uppercase; text-align:left; padding:6px6px6px12px; background:#CAE8EAurl(/images/bg_header.jpg)no-repeat; } .gradientTableth.nobg{ border-top:0; border-left:0; border-right:1pxsolid#C1DAD7; background:none; } .gradientTabletd{ border-right:1pxsolid#C1DAD7; border-bottom:1pxsolid#C1DAD7; font-size:11px; padding:6px6px6px12px; color:#4f6b72; } .gradientTabletr:nth-child(odd){ background:#fff; } .gradientTabletr:nth-child(even){ background:#F5FAFA; } PythonRobotFramework使用小結 «上一篇 利用mail傳送163郵件下一篇» 相關推薦 純css美化單選按鈕

... 純css美化select 效果圖如下: <h2>Cars... 純CSS美化HTML的Table 今天發覺一個很好的表格CSS程式碼:http://veerle-v2.duoh.com/blog/comments/a_c... 純CSS美化表格單元格背景效果,效果很帥 </h2> <table poiorfaaamanageutlormreadcolavl css scrollbar-base-color: s... css- tom class=" table table-bordered"> 今天是11月份的<span>第一天</span> </table>


請為這篇文章評分?