css在不同的文件類型中的區別

來源:互聯網
上載者:User
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
·所有的單位必須明確指定,如 body { margin: 0px; }
·指定寬度和高度的時候,要從實際的寬度和高度中減去Padding,如一個DIV的顯示高度為200,而其Padding為:10px 0px 5px 0px,則div的Height不能定為200px,而應該是:185px;

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
·所有的單位預設為px,因此當不指定時等價於px
·指定寬度和高度的時候,不受Padding的影響

相關文章

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.