Documente Academic
Documente Profesional
Documente Cultură
Cross-browser coding..................................................................................................................................1
Same Markup: Core Guidelines...........................................................................................................1
Browser Detection...............................................................................................................................2
HTML5.........................................................................................................................................................3
CSS3 (code!)............................................................................................................................................3
SVG – scalable vector graphicks..............................................................................................................3
HTML5 Cross-Document Messaging....................................................................................................4
Links............................................................................................................................................................5
Misc.............................................................................................................................................................5
------------ http://www.modernizr.com/...............................................................................................5
Cross-browser coding
http://blogs.msdn.com/b/ie/archive/2010/04/14/same-markup-writing-cross-browser-code.aspx
Tony Ross. http://bit.ly/csLdGX http://live.visitmix.com/MIX10/Sessions/CL27
(same markup tony ross)
2. Unique Objects
if(document.all) …
if(window.attachEvent)…
if(window.ActiveXObject)…
3. Unique Behaviours (CSS Hacks, etc.)
* html {}
the problem: altering code based on a specific browser limits the adaptability of web pages.
// [TR] Different listeners added for illustration
function f1() { document.write("addEventListener was used"); }
function f2() { document.write("attachEvent was used"); }
Feature detection enables cross-browser code to "just work" without requiring you to know the
capabilities of each and every browser ahead of time. One framework which relies almost entirely on
feature detection is jQuery. In fact the jQuery.support documentation details how you can use jQuery's
feature detection in your own site.
Hiding in markup
<!-- Elements with fallback content -->
<video src="test.video">
<object src="test.video">
<a href="test.video"> Download Video </a>
</object>
</video>
Hiding in CSS
/* Unrecognized properties are ignored */
.target
{
border-radius: 20px;
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
}
HTML5
New doctype
o <! DOCTYPE html>
<html>…
New structural elements (nav header footer…)
New media elements
New parsing rules
New APIs
CSS3 (code!)
Background-color{rgba(255,0,0,0.5)} – с прозрачностью
Border-radius: 20px; - округляет рамку по углам
Border-radius: 20px 20px 0 0;
ul li:nth-of-type(1) {
1st element of the list
}
Ul li:nth-last-of-type(1){
…Last element of the list
}
JS
addEventListener
getElementsByClassName
Debugging (F12)
alert(window.msPerformance.timing.domComplete);
Recognition
<meta http-equiv=”X-UA-Compatible” content=”IE=9” />
---------
contenttype=”application/xhtml+xml”
Imaging
International color consortium (ICC)
===================================================================
Links
http://tath.am
http://blog.tatham.oddie.com.au/
http://www.msteched.com/
http://net.tutsplus.com/category/tutorials/asp-net/ ???
http://net.tutsplus.com/tutorials/asp-net/asp-net-from-scratch-sql-server/
http://forums.tutorialized.com/web-design-development-articles-134/
===================================================================
Misc
var form = document.createElement("div");
var root = document.documentElement;
root.insertBefore( form, root.firstChild );
------------ http://www.modernizr.com/
----------------