CSS sliding door for automatic switching

Source: Internet
Author: User
Tip: You can modify some of the code before running

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <ptml xmlns=" http://www.w3.org/1999/xhtml "> <pead> <meta http-equiv=" Content-type "content=" text/html; charset=gb2312 "/> <meta content=" "name=keywords> <title> column switching </title> <link rel=" shortcut Icon "href=" Designac.ico "> <link rel=" Bookmark "href=" Designac.ico "> <style> *{padding:0;margin:0} body {padding:0; font-size:12px; margin:0px Auto; COLOR: #333; Text-align:center;margin:5 0px;} . indexnews {float:left; width:430px;} . Top {margin-left:-1px;background: #f9fdf7; Width:auto; HEIGHT:27PX} a:link {color: #000000; text-decoration:none;font-family: "XXFarEastFont-Arial"; font-size:14px;} a:hover {color: #000000; text-decoration:none;font-family: "Song body"; font-size:14px;} . option1 {font-weight:bold; Float:left; width:99px; Cursor:pointer; LINe-height:24px;background:url (images/bg.gif) no-repeat #aaf; height:27px;margin-left:5px;} . option2 {float:left; width:99px; Cursor:pointer; Background:url (images/bg.gif) no-repeat #faa; line-height:24px; height:27px;margin-left:5px;} . newsborder {BORDER: #a4a4a4 1px solid; border-top:0; table-layout:fixed; width:409px; Height:350px;background: #f9fdf7;} . articlelist {padding-top:0px 3px; margin:0px; Text-align:left}. articlelist img {float:left;margin:5px 10px 5px 0}. articlelist UL {width:400px; margin:0px; COLOR: #dedede; List-style-type:none}. articlelist li {float:left;width:170px;margin:5px 5px 0 10px; articlelist li A {C Olor: #333; text-decoration:none;font-family: "Song body"; font-size:12px; }. articlelist LI a:hover {COLOR: #bf0000; text-decoration:none;font-family: "Song body"; font-size:12px;} </style> </pead> <script language=javascript >//activity var NewsID = '; function News (ID) {var Newsobj = document.getElementById (' a ' + NewsID); if (newsobj) {newsObj.style.display = ' none '; document.getElementById (' B ' + newsID). ClassName = ' option2 '; var obj = document.getElementById (' A ' + ID); document.getElementById (' B ' + id). ClassName = ' option1 '; Obj.style.display = '; NewsID = ID; K=id; } var news1id = '; function news1 (id) {var news1obj = document.getElementById (' C ' + news1id); if (news1obj) {news1Obj.style.display = ' none '; document.getElementById (' d ' + news1id). ClassName = ' option2 '; var obj = document.getElementById (' C ' + ID); document.getElementById (' d ' + id). ClassName = ' option1 '; Obj.style.display = '; News1id = ID; </SCRIPT> <body> <!--first frequency--> <!--activity--> <div class= "Indexnews" > <div class= "Top" > <div class= "Option2" id= "B1" onmouseover= "News (1)" > Latest activity </div> <div class= "Option2" id= "B2" Onmouseove R= "News (2)" > Recommended activities </div> <div class= "Option2" id= "B3" onmouseover= "News (3)" > event theme </div> <div class= "Option2" id= "B4" News ( 4) > Activity </div> </div> <div class= "Newsborder" > <div id= "a1" > <div Class=articleli St> <ul> <!--latest events--> <li><a href= "#" > Dynamic zone My Music site, 2008 weeks, Jasper World Tour Back to the concert • Beijing </A></li> <li><a href= "#" > Dynamic zone My Music site 2008 weeks Jay World Tour • Beijing </A></li> <li><a href= "#" > Dynamic zone My Music site 2008 weeks of the Jasper World Tour • Beijing </A></li> <li><a href= "#" > Dynamic zone My Music site 2008 weeks of the Jay World Tour • Beijing </A></li> <li><a href= "#" > Dynamic zone My Music site 2008 weeks of the Jasper World Tour Sing-Beijing </A></li> <li><a href= "#" > Dynamic zone My Music site 2008 weeks Jay World Tour • Beijing </A></li> </ul> </div> </div> <div id= "A2" > <div class=articlelist> <ul> <!--recommended activities--> <li><a href= "#" > Dynamic zone My Music site 2008 weeks Jie World Tour • Beijing </A></li> <li><a href= "#" > Dynamic zone My Music site 2008 weeks Jay World Touring concert • Beijing </A></li> <li><a href= "#" > Move A sense of my music site 2008 weeks of Jay World Tour • Beijing </A></li> <li><a href= "#" > Dynamic zone My Music site 2008 week Jay World Tour • Beijing ;/a></li> </ul> </div> </div> <div id= "A3" > <div Class=ar Ticlelist> <ul> <!--event theme--> <li><a href= "#" > Dynamic zone My Music site 2008 Jay Chou World Tour • Beijing </A></li> <li><a href= "#" > Dynamic zone My Music site 2008 weeks of the Jasper World tour • Beijing </a></li > <li><a href= "#" > Dynamic zone My Music site 2008 weeks Jay World Touring concert • Beijing </A></li> <li>< A href= "#" > Dynamic zone My Music site 2008 weeks of the Jay World Tour • Beijing </A></li> <li><a href= "#" > Dynamic zone My Music site 2008 weeks Jay World Tour concert Beijing &LT;/A&GT;&Lt;/li> </ul> </div> </div> <div id= "A4" > <div class=articlelist > <ul> <!--events--> <li><a href= "#" > Dynamic zone My Music site 2008 weeks of the World of Jasper Tour Sing-Beijing </A></li> <li><a href= "#" > Dynamic zone My Music site 2008 weeks Jay World Tour • Beijing </A></li> <li><a href= "#" > Dynamic zone My Music site 2008 weeks of the Jasper World Tour • Beijing </A></li> <li><a href= "# "> Dynamic zone My Music site 2008 weeks Jie LUN World Tour • Beijing </A></li> </ul> </div> </div> < /div> </div> <script language=javascript> var k=0; Window.onload=function init () {k++; if (k>4) K=1 News (k) settimeout (init,2000)/Pause time 2 sec} </script><!--call id= 1 div Initial page display content First channel--> </body> </ptml>
Tip: You can modify some of the code before running

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.