awk数组
2015-05-30 22:07
260 查看
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也算上
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也算上
相关文章推荐
- openwrt mt7620a devicetree研究
- Hibernate映射(三)— 一对一
- 跟随鼠标移动的div框
- 我收藏的编译原理相关书籍
- 我收藏的编译原理相关书籍
- Android开源项目SlidingMenu深入剖析
- 五分钟理解一致性哈希算法(consistent hashing)
- 我收藏的编译原理相关书籍
- Raspberry Pi-2 启动自动挂载USB设备
- android gradle初探
- 冒泡排序进阶
- IOS中操作表ActionSheet
- 无废话WCF入门教程五[WCF的通信模式]
- Activity的四种加载模式
- javascript基础
- perl函数substr
- JAVA编码规范
- myBatis的SQL注入问题
- Manacher算法:求解最长回文字符串,时间复杂度为O(N)
- 无废话WCF入门教程三[WCF的宿主]