หัวข้อ: เอาเมาส์ไปวางแล้วสีเปลี่ยน ทำยังไงหรอครับ
เริ่มหัวข้อโดย: mikeyx ที่ 11 เมษายน 2008, 14:16:16
http://www.net-com.co.th/2005/th/home/index.php ประมาณนี้ครับเขาใช้เทคนิคอะไรทำ ???
หัวข้อ: Re: เอาเมาส์ไปวางแล้วสีเปลี่ยน ทำยังไงหรอครับ
เริ่มหัวข้อโดย: EThaiZone ที่ 11 เมษายน 2008, 14:28:30
ก็ css ไงครับ ??? /*ลิงค์ปกติ*/ a:link { color:#0000FF; text-decoration:none }
/*ลิงค์เข้าชมแล้ว*/ a:visited { color:#0000FF; text-decoration:none }
/*ลิงค์ที่กำลังถูกกด*/ a:active { color:#FF9900; text-decoration:none }
/*ลิงค์ที่เมาส์กำลังอยู่เหนือลิงค์*/ a:hover { color:#FF9900; text-decoration:none }
หัวข้อ: Re: เอาเมาส์ไปวางแล้วสีเปลี่ยน ทำยังไงหรอครับ
เริ่มหัวข้อโดย: mikeyx ที่ 11 เมษายน 2008, 15:14:44
คือเปลี่ยนสีทั้งเวบเลยนะครับ
อันนั้นมันลิงค์เฉย ๆไม่ใช่หรอครับ คือที่ผมต้องการคือ เปลี่ยนสี เวบเลยอะ แบบ yahoo
หัวข้อ: Re: เอาเมาส์ไปวางแล้วสีเปลี่ยน ทำยังไงหรอครับ
เริ่มหัวข้อโดย: EThaiZone ที่ 11 เมษายน 2008, 15:25:30
อ้อ เพิ่งสังเกต ลองดูโค้ดเหล่านี้ประกอบ ก็น่าจะเก็ทนะครับ //ส่วนแรก อยู่ใน head <link href="../../css/style1.css" rel="stylesheet" type="text/css"> <link href="../../css/style2.css" rel="stylesheet" type="text/css"> <link href="../../css/style3.css" rel="stylesheet" type="text/css"> <link href="../../css/style4.css" rel="stylesheet" type="text/css"> <link href="../../css/style5.css" rel="stylesheet" type="text/css">
//ส่วนสองเป็นจาวาสคริป function changeSheets(whichSheet){ whichSheet=whichSheet-1; if(document.styleSheets){ var c = document.styleSheets.length; for(var i=1;i<c;i++){ if(i!=whichSheet){ document.styleSheets[i].disabled=true; }else{ document.styleSheets[i].disabled=false; } } } }
//ส่วนสามอยู่ใน body ที่เป็นจุดใช้เปลี่ยนสี <td width="22"><a href="?act=setColor&color=1"><img src="../../images/color1.gif" width="14" height="14" border="0" onMouseOver="changeSheets(1)"></a></td> <td width="22"><a href="?act=setColor&color=2"><img src="../../images/color2.gif" width="14" height="14" border="0" onMouseOver="changeSheets(2)"></a></td> <td width="22"><a href="?act=setColor&color=3"><img src="../../images/color3.gif" width="14" height="14" border="0" onMouseOver="changeSheets(3)"></a></td> <td width="22"><a href="?act=setColor&color=4"><img src="../../images/color4.gif" width="14" height="14" border="0" onMouseOver="changeSheets(4)"></a></td> <td width="22"><a href="?act=setColor&color=5"><img src="../../images/color5.gif" width="14" height="14" border="0" onMouseOver="changeSheets(5)"></a></td> เทคนิคเข็มขัดสั้นนะเนี่ย :P
หัวข้อ: Re: เอาเมาส์ไปวางแล้วสีเปลี่ยน ทำยังไงหรอครับ
เริ่มหัวข้อโดย: mikeyx ที่ 11 เมษายน 2008, 15:34:48
ขอบคุณครับเข็ดขัดสั้นอีกและ ผมคิดมากไปเอง เอิ๊ก ๆๆ
หัวข้อ: Re: เอาเมาส์ไปวางแล้วสีเปลี่ยน ทำยังไงหรอครับ
เริ่มหัวข้อโดย: jiw ที่ 11 เมษายน 2008, 16:10:45
เข้ามาตอบไม่ทัน 55+
ถ้าเป็นผม ผมก็แนวๆข้างบน ... ใช้ java script แล้วก็ onChange ไปเลย
เป็นความรู้ที่ได้จากการเรียนมา ^^
หัวข้อ: Re: เอาเมาส์ไปวางแล้วสีเปลี่ยน ทำยังไงหรอครับ
เริ่มหัวข้อโดย: ฉันไม่มีตัวตน ที่ 11 เมษายน 2008, 16:51:50
ขอบคุณครับขอรับไปเลยละกัน
ปล.ยังใจดีเหมือนเดิม :-*
หัวข้อ: Re: เอาเมาส์ไปวางแล้วสีเปลี่ยน ทำยังไงหรอครับ
เริ่มหัวข้อโดย: Dr.K ที่ 11 เมษายน 2008, 17:40:53
Thx มากๆครับ
|