close

1.http://www.w3schools.com/css/css_howto.asp

Cascading order

Note: If the link to the external style sheet is placed after the internal style sheet in HTML <head>, the external style sheet will override the internal style sheet!

 

2.http://www.w3schools.com/css/css_font.asp

Set Font Size With Em

The size can be calculated from pixels to em using this formula: pixels/16=em

Use a Combination of Percent and Em

The solution that works in all browsers, is to set a default font-size in percent for the body element:

Example

body {font-size:100%;}
h1 {font-size:2.5em;}
h2 {font-size:1.875em;}
p {font-size:0.875em;}

http://www.w3schools.com/css/tryit.asp?filename=trycss_table_border-collapse

4.http://www.w3schools.com/css/css_list.asp
Crossbrowser Solution

The following example displays the image-marker equally in all browsers:

Example

ul
{
list-style-type: none;
padding: 0px;
margin: 0px;
}
li
{
background-image: url(sqpurple.gif);
background-repeat: no-repeat;
background-position: 0px 5px; 
padding-left: 14px; 
}

 

5.http://www.w3schools.com/css/css_boxmodel.asp

Browsers Compatibility Issue

If you tested the previous example in Internet Explorer, you saw that the total width was not exactly 250px.

IE8 and earlier versions includes padding and border in the width, when the width property is set,unless a DOCTYPE is declared.

To fix this problem, just add a DOCTYPE to the code:

Example

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style type="text/css">
div.ex
{
width:220px;
padding:10px;
border:5px solid gray;
margin:0px;
}
</style>
</head>

 

6.http://www.w3schools.com/js/js_functions.asp
Note: Do not forget about the importance of capitals in JavaScript! The word function must be written in lowercase letters, otherwise a JavaScript error occurs! Also note that you must call a function with the exact same capitals as in the function name.

7.http://www.w3schools.com/js/js_loop_for_in.asp

JavaScript Try...Catch Statement

8.http://www.w3schools.com/js/js_try_catch.asp
JavaScript Try...Catch Statement

Note that try...catch is written in lowercase letters. Using uppercase letters will generate a JavaScript error!

9.



 

 

 

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 ivch23 的頭像
    ivch23

    邁向人生勝利組の成長日誌

    ivch23 發表在 痞客邦 留言(0) 人氣()