浠诲姟4-HTML1

闂瓟

1.缃戦〉涔辩爜闂

鎴戜竴鐩村緢璁ㄥ帉gbk锛� 涓轰簡鑺傜害閭d箞涓�鐐圭偣绌洪棿鏀惧純浜嗛�氱敤鎬э紝杩樻槸utf-8姣旇緝鍚堥��

涔辩爜灏辨槸瀛楃缂栫爜璁剧疆涓嶅綋閫犳垚鐨勶紝涓汉璁や负鐢╱tf-8灏辨槸浜�

2.棰滆壊

搴旇灏辨槸涔濈鍐欐硶

鍏抽敭瀛楅鑹� #RRGGBB \ #RGB rgb() hsl() rgba() hsla() currentColor transparent rebeccapurple

绾㈣壊鍐欐硶

  red
  #ff0000
  #f00
  rgb(255,0,0)

缁胯壊鍐欐硶

green
#008000
#080
rgb(0,128,0)

钃濊壊鍐欐硶

blue
#0000FF
#00f
rgb(0,0,255)

鐧借壊鍐欐硶

write
#FFFFFF
#FFF
rgb(255,255,255)

榛戣壊鍐欐硶

black
#000000
#000
rgb(0,0,0)

榛戣壊閫忔槑鍐欐硶

.xxx{
      color:rgb(0,0,0,0.x);  
      
      }
.xxx2{
        color:#000;
        opacity:0.x;
         
      }

3. 鐨勪綔鐢ㄦ槸浠�涔�

澹版槑鏂囨。鐨勮В鏋愮被鍨�(document.compatMode)锛岄伩鍏嶆祻瑙堝櫒鐨勬�紓妯″紡銆�
document.compatMode锛� BackCompat锛氭�紓妯″紡锛屾祻瑙堝櫒浣跨敤鑷繁鐨勬�紓妯″紡瑙f瀽娓叉煋椤甸潰銆� CSS1Compat锛氭爣鍑嗘ā寮忥紝娴忚鍣ㄤ娇鐢╓3C鐨勬爣鍑嗚В鏋愭覆鏌撻〉闈€��
杩欎釜灞炴�т細琚祻瑙堝櫒璇嗗埆骞朵娇鐢紝浣嗘槸濡傛灉浣犵殑椤甸潰娌℃湁DOCTYPE鐨勫0鏄庯紝閭d箞compatMode榛樿灏辨槸BackCompat,
杩欎篃灏辨槸鎭堕瓟鐨勫紑濮� -- 娴忚鍣ㄦ寜鐓ц嚜宸辩殑鏂瑰紡瑙f瀽娓叉煋椤甸潰锛岄偅涔堬紝鍦ㄤ笉鍚岀殑娴忚鍣ㄥ氨浼氭樉绀轰笉鍚岀殑鏍峰紡銆�
濡傛灉浣犵殑椤甸潰娣诲姞浜�閭d箞锛岄偅涔堝氨绛夊悓浜庡紑鍚簡鏍囧噯妯″紡锛岄偅涔堟祻瑙堝櫒灏卞緱鑰佽�佸疄瀹炵殑鎸夌収W3C鐨�
鏍囧噯瑙f瀽娓叉煋椤甸潰锛岃繖鏍蜂竴鏉ワ紝浣犵殑椤甸潰鍦ㄦ墍鏈夌殑娴忚鍣ㄩ噷鏄剧ず鐨勫氨閮芥槸涓�涓牱瀛愪簡銆�
杩欏氨鏄�鐨勪綔鐢ㄣ��
ps.(涓汉浠ヤ负灏辨槸璁╂祻瑙堝櫒鐭ラ亾鏄痟5鐨勬爣鍑�)

4.涓ユ牸妯″紡鍜屾贩鏉傛ā寮忔寚浠�涔�

涓ユ牸妯″紡锛氭寜鐓х‘瀹氱殑瑙勮寖娓叉煋椤甸潰
娣锋潅妯″紡锛氫互鍚戜笅鍏煎鐨勬ā寮忔覆鏌撻〉闈�

5.meta 鏈変粈涔堜綔鐢紝甯歌鐨勫�兼湁鍝簺

鍏冪礌鍙彁渚涙湁鍏抽〉闈㈢殑鍏冧俊鎭�

5.1. name鏍囩

鎻愪緵缁欐悳绱㈠紩鎿庣殑鍏抽敭璇嶏紝鐢ㄤ綔seo绛�

5.2.http-equiv 灞炴��

http-equiv 灞炴�т负鍚嶇О/鍊煎鎻愪緵浜嗗悕绉般�傚苟鎸囩ず鏈嶅姟鍣ㄥ湪鍙戦�佸疄闄呯殑鏂囨。涔嬪墠鍏堝湪瑕佷紶閫佺粰娴忚鍣ㄧ殑 MIME 鏂囨。澶撮儴鍖呭惈鍚嶇О/鍊煎銆�
褰撴湇鍔″櫒鍚戞祻瑙堝櫒鍙戦�佹枃妗f椂锛屼細鍏堝彂閫佽澶氬悕绉�/鍊煎銆傝櫧鐒舵湁浜涙湇鍔″櫒浼氬彂閫佽澶氳繖绉嶅悕绉�/鍊煎锛屼絾鏄墍鏈夋湇鍔″櫒閮借嚦灏戣鍙戦�佷竴涓細content-type:text/html銆傝繖灏嗗憡璇夋祻瑙堝櫒鍑嗗鎺ュ彈涓�涓� HTML 鏂囨。銆�

椤甸潰浠g爜



娴忚鍣ㄦ帴鍙楀埌鐨勫ご淇℃伅

content-type: text/html
charset:iso-8859-1
expires:31 Dec 2008
5.3.content 灞炴��

content 灞炴�ф彁渚涗簡鍚嶇О/鍊煎涓殑鍊笺�傝鍊煎彲浠ユ槸浠讳綍鏈夋晥鐨勫瓧绗︿覆銆�
content 灞炴�у缁堣鍜� name 灞炴�ф垨 http-equiv 灞炴�т竴璧蜂娇鐢ㄣ��

5.4.scheme 灞炴��

scheme 灞炴�х敤浜庢寚瀹氳鐢ㄦ潵缈昏瘧灞炴�у�肩殑鏂规銆傛鏂规搴旇鍦ㄧ敱 鏍囩鐨� profile 灞炴�ф寚瀹氱殑姒傚喌鏂囦欢涓繘琛屼簡瀹氫箟銆�

6.

鏈変粈涔堜綔鐢�


Edge 妯″紡鍛婅瘔 IE浠ユ渶楂樼骇妯″紡娓叉煋鏂囨。锛屼篃灏辨槸浠讳綍 IE鐗堟湰閮戒互褰撳墠鐗堟湰鎵�鏀寔鐨勬渶楂樼骇鏍囧噯妯″紡娓叉煋锛岄伩鍏嶇増鏈崌绾ч�犳垚鐨勫奖鍝嶃�傜畝鍗曠殑璇达紝灏辨槸浠�涔堢増鏈� IE灏辩敤浠�涔堢増鏈殑鏍囧噯妯″紡娓叉煋


浣跨敤浠ヤ笅浠g爜寮哄埗 IE 浣跨敤 Chrome Frame 娓叉煋

Goole Chrome娴忚鍣ㄥ唴宓屾鏋舵槸涓�涓紑鏀炬簮浠g爜鎻掍欢锛屽彲灏嗚胺姝屾祻瑙堝櫒鐨勫紑鏀剧綉缁滄妧鏈拰蹇�烰avaScript寮曟搸涓嶪nternet Explorer鏃犵紳缁撳悎銆�

ps.寰蒋鐨刬e涓氱晫姣掔槫闃�

7.甯歌鐨勬祻瑙堝櫒鏈夊摢浜涳紝浠�涔堝唴鏍�

甯歌娴忚鍣�
opera chrome firefox edge(ie宸叉) 360娴忚鍣� 鑵捐娴忚鍣�
uc娴忚鍣� 鐚庤惫娴忚鍣� 锛堝悇绉嶅澹虫祻瑙堝櫒绛夌瓑锛�
娴忚鍣ㄥ垎涓夌被锛屽ie澹崇殑,濂楃涓夋柟鍐呮牳鎵�璋撳弻鏍革紙涓夋牳锛夋祻瑙堝櫒锛岃嚜宸辩爺鍙戝唴鏍搁粯榛樹粯鍑虹殑

涓�銆乀rident鍐呮牳浠h〃浜у搧Internet Explorer
浜屻�丟ecko鍐呮牳浠h〃浣滃搧Mozilla
涓夈�乄ebKit鍐呮牳浠h〃浣滃搧Safari銆丆hromewebkit 鏄竴涓紑婧愰」鐩�
鍥涖�丳resto鍐呮牳浠h〃浣滃搧OperaPresto鏄敱Opera Software寮�鍙戠殑娴忚鍣ㄦ帓鐗堝紩鎿庯紝渚汷pera 7.0鍙婁互涓婁娇鐢ㄣ�傚畠鍙栦唬浜嗘棫鐗圤pera 4鑷�6鐗堟湰浣跨敤鐨凟lektra鎺掔増寮曟搸锛屽寘鎷姞鍏ュ姩鎬佸姛鑳斤紝渚嬪缃戦〉鎴栧叾閮ㄥ垎鍙殢鐫�DOM鍙奡cript璇硶鐨勪簨浠惰�岄噸鏂版帓鐗堛��(鐜板湪opera涔熸姇鍏ヤ簡chrome鐨勬��鎶�)

鏈暀绋嬬増鏉冨綊freeidea鍜岄ゥ浜鸿胺鎵�鏈夛紝杞浇椤昏鏄庢潵婧�

你可能感兴趣的:(浠诲姟4-HTML1)