A, html5 What are the new features, to remove those elements, how to deal with browser compatibility issues new HTML tags? How to distinguish between HTML and HTML5?
New features:
- Drag release (Drag and drop) API
- Better semantic content tag (header, footer, section, nav, aside, article)
- Audio, video API (audio, video)
- Canvas API (Canvas)
- Geographic API (Geolocation)
- After long-term storage of data stored locally localStorage, browser closes data is not lost
- sessionStorage data is automatically deleted when the browser is closed
- Form controls, calendar, date, time, email , url, search
the removal of elements: - Pure performance elements: font, basefont, big, center, s, strike;
- Element can have a negative impact on the use of: frame, frameset, noframes;
compatibility:
IE8 / IE7 / IE6 support label produced by document.createElement method, you can use this feature to make these new browsers support HTML5 tags.
How to distinguish:
DOCTYPE declaration, the new structural elements, functional elements
Two, CSS3 What's new there?
- Fillet (border-radius), the shadow (box-shadow)
- Text effects (text-shadow), linear gradient (gradient), rotation (Transform)
- More and more CSS selectors background rgba
- Media queries, multi-column layout
- border-image
- The only pseudo-element is :: selection
Third, the description of the distinction cookies, sessionStorage and localStorage of:
Similarities: the client are stored in
different points:
1. Storage Size:
* cookies can not exceed the data size of 4K
* Although sessionStorage localStorage and store size is also limited, but larger than the plurality of cookies, can reach more than 5M
2. valid time :
* cookies will remain valid until the expiration time set cookies, even if the browser is closed
* localStorage to store persistent data, after the browser is closed automatically deleted unless the data is not lost
* sessionStorage current data is automatically deleted when the browser window is closed
3. data server interactive way:
* cookies data automatically to the server, the server can also write cookies are clients
* localStorage and sessionStorage not automatically transfer the data to the server, save only in the local
Four, CSS has a content property? what's the effect?
css 的 content 应用在 before/after 伪元素上,用来插入生成的内容。最常见是利用伪元素清除浮动
- Why remove floating? How to remove floating?
To prevent the collapse of the height of the problem. Parent elements provided overflow: hidden / auto;
.clearfix::after{ content:" ", display:block; clear:both }