页面布局

1、Avoid div-itis
The danger when using div and span elements is in going overboard.
A few of them placed in strategic spots can greatly enhance the inherent structure of a document;
too many, and you may wish to question whether there's a more appropriate HTML element you should be using.
For example, a div should never be used where an h3 would make more sense, and a span should never replace a label.

But that doesn't mean they should be avoided. A few divs in logical spots throughout your document will provide extra styling control and logical separation of sections. Think of a div as a reusable container: You don't want to bury your content in too many containers, but a few well-placed divs can keep content sorted well.

You can apply both a class and an id to a single element, but remember that using more than one instance of the same id within a page is invalid. Alphanumeric characters (a-z, A-Z, 0-9) can be used in both class and id names, but neither may start with a number. And even though some browsers are forgiving, it's wise to consider both case-sensitive, for ease of debugging.

2、innerHeight() 把padding算上去
outHeight() 把border也算上
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值