css不常用樣式

來源:互聯網
上載者:User
table的cellpadding和cellpadding我們經常會用如下的方式來清除預設樣式:<table cellspacing="0" cellpadding="0"></table>

很多朋友會說表現在結構中,這樣不符合標準,那如何將這個表現拿出來,有些朋友或許很迷惑。我們可以用table的border-collapse: collapse;屬性 來代替cellspacing="0",用th,td的padding: 0; 屬性來代替cellpadding="0"。table { 
 border-collapse:collapse; 
 border-spacing:0; 

th,td { 
 padding: 0; 
}

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.