Webkit ÒýÇæ
ÒÔÏ´úÂëÊÊÓÃÓÚ webkit ÒýÇæµÄä¯ÀÀÆ÷£¬Èç Safari£¬Chrome µÈ¡£Ëü»á´Ó¶¥²¿ (#ccc) µ½µ×²¿ (#000) ³ÊÏÖÒ»¸öÏßÐÔ½¥±ä¡£
background: -webkit-gradient(linear, left top, left bottom, from(#ccc), to(#000));Firefox 3.6+
background: -moz-linear-gradient(top, #ccc, #000);Internet Explorer
ÒÔϵÄÂ˾µ´úÂëÖ»Äܱ» IE ½âÊÍÖ´ÐУº
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc', endColorstr='#000000');¿çä¯ÀÀÆ÷ CSS ½¥±ä£¨ÑÝʾ£©
½áºÏ½«ÉÏÃæµÄÈý¿é´úÂ룬¾ÍÊÇÒ»¸ö¿çä¯ÀÀÆ÷µÄ½¥±äЧ¹û¡£×¢£ºÎÒÌí¼ÓÁËÒ»¸ö±³¾°ÑÕÉ«ÒÔ·ÀÓû§Ê¹ÓõÄä¯ÀÀÆ÷²»Ö§³Ö¸Ã¹¦ÄÜ¡£
background: #999; /* for non-css3 browsers */ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc', endColorstr='#000000'); /* for IE */ background: -webkit-gradient(linear, left top, left bottom, from(#ccc), to(#000)); /* for webkit browsers */ background: -moz-linear-gradient(top, #ccc, #000); /* for firefox 3.6+ */CSS ½¥±äÏÂÀ²Ëµ¥
ÒÔÏÂÊÇÒ»¸öʹÓà CSS3 ÎÄ×ÖÒõÓ° (text-shadow)£¬Ô²½Ç (radius-border)£¬ÒõÓ° (box-shadow) µÄ´¿ CSS ½¥±äÏÂÀ²Ëµ¥£¬Î´Éæ¼°ÈκΠJavaScript »ò ͼƬ¡£
Internet Explorer µÄ¾ÖÏÞÐÔ
IE µÄ½¥±äÂ˾µ²»Ö§³Ö¶àÖؽ¥±ä (color-stop)£¬½¥±ä½Ç¶È (gradient angle)£¬¾¶Ïò½¥±ä (radial gradient)¡£ÕâÒâζ×ÅÄãÖ»ÄÜʹÓà StartColorStr ºÍ EndColorStr Á½ÖÖÑÕÉ«Ö¸¶¨Ë®Æ½»ò´¹Ö±µÄÏßÐÔ½¥±ä¡£
½áÊøÓï
Çë×¢Òâ²¢²»ÊÇËùÓÐä¯ÀÀÆ÷¶¼Ö§³Ö CSS ½¥±äÊôÐÔ¡£Îª±£Ö¤°²È«£¬ÔÚ±àÂëÒ³Ãæ²¼¾Öʱ²»ÒªÒÀÀµÓÚ CSS ½¥±ä£¬ËüÖ»ÊʺÏÓÃÀ´¼ÓÇ¿Ñùʽ±íÏÖ¡£
¡¡