Native javascript tab switch effect code

Source: Internet
Author: User
Tip: you can modify some code before running

<!DOCTYPE http://www.111cn.net/js_a/javascript/html PUBLIC "-//W3C//DTD XHTML ○○@http://www.111cn.net/js_a/javascript/0$@○○.http://www.111cn.net/js_a/javascript/0 Transitional//EN" "http://www.111cn.net/js_a/javascript/http://www.w3.org/TR/xhttp://www.111cn.net/js_a/javascript/html○○@http://www.111cn.net/js_a/javascript/0$@○○/DTD/xhttp://www.111cn.net/js_a/javascript/html○○@http://www.111cn.net/js_a/javascript/0$@○○-transitional.dtd"><http://www.111cn.net/js_a/javascript/html xmlns="http://www.111cn.net/js_a/javascript/http://www.w3.org/○○@http://www.111cn.net/js_a/javascript/0$@○○999/xhttp://www.111cn.net/js_a/javascript/html"><http://www.111cn.net/js_a/javascript/head><meta http://www.111cn.net/js_a/javascript/http-equiv="Content-Type" content="text/http://www.111cn.net/js_a/javascript/html; chttp://www.111cn.net/js_a/javascript/harset=utf-8" /><title>Native javascript tab switch effect code</title><style type="text/css">. Main {widthttp: // your margin: http://www.111cn.net/js_a/javascript/0 auto;} # title {your line-monitoring span {float: left; widthttp: // your own margin-righttp: // www.111cn.net/js_a/javascript/ht:5px; color: #333; background: # eee; text-align: center; cursor: pointer; font-weighttp: // tianspan. on {background: #333; color: # fff ;}# con {background: # fafafa; invalid border-top: 2px solid #333 ;}# con ul {display: none; padding: ○ @ ul. on {display: block;} # con ul li {your line-history border-bottom: ○ @ http://www.111cn.net/js_a/javascript/0$@○○px dotted # ccc; text-indent: ○ @ http://www.111cn.net/js_a/javascript/0$@○○http://www.111cn.net/js_a/javascript/0px;}/* YUI reset */* {margin: http://www.111cn.net/js_a/javascript/0; padding: adjust body, div, dl, dt, dd, ul, ol, li, else {margin: rows} */table {border-collapse: collapse; border-spacing: border {border: border {font-style: normal; font-weighttp: // rows {list-style: none;} caption, thttp: // www.111cn.net/js_a/javascript/h {text-align: left ;}{font-size: ○ @ blank {content: '';} abbr, acronym {border: http://www.111cn.net/js_a/javascript/0?#/* my */. clearfix: after {content :". "; display: block; expose clear: bothttp: // www.111cn.net/js_a/javascript/h; visibility: visibility {* zoom: ○ @ override {color: #333; font-size: ○ @ resolve font-family: Verdana, Arial, Helvetica, sans-serif;} a {text-decoration: none; color: #333;}: the http://www.111cn.net/js_a/javascript/hover {text-decoration: underline ;}. wrapper {widthttp: // your margin: http://www.111cn.net/js_a/javascript/0 auto; padding-bottom: 5 rows {widthttp: // your margin: ○ @ your auto fill li {padding-top: 5px ;}{your line-weight font-size: 22px; font-weighttp: // www.111cn.net/js_a/javascript/ht:normal; font-family: "Microsoft YaHei", SimHei ;}. download {display: inline-block; your line-embedded padding: http://www.111cn.net/js_a/javascript/0 ○ @ your background: #333; font-size: ○ @ http://www.111cn.net/js_a/javascript/0379@%4px; font-weighttp: // www.111cn.net/js_a/javascript/ht:bold; text-align: center; color: # fff; border: ○ @ resolve solid #999; margin-top: ○ @ override {prop padding: 2 http://www.111cn.net/js_a/javascript/0px http://www.111cn.net/js_a/javascript/0 ○ @ login margin-bottom: ○ @ login {margin-top: 2 http://www.111cn.net/js_a/javascript/0px; border: ○ @ login solid # ccc; padding-bottom: ○ @ brief dt {your line-warning font-weighttp: // www.111cn.net/js_a/javascript/ht:bold; text-indent: ○ @ brief dd {line-warning padding: 5px 2 into dd a {text-decoration: underline ;}. tongji {display: none ;}</style><script type="text/javascript">Window. onload = function () {var oTitle = document. getElementById ('title'); var aSpan = oTitle. getElementsByTagName ('span '); var oCon = document. getElementById ('con '); var aUl = oCon. getElementsByTagName ('Ul '); var I = http://www.111cn.net/js_a/javascript/0;for (I = http://www.111cn.net/js_a/javascript/0; I<aSpan.lengthttp://www.111cn.net/js_a/javascript/h; i++) {var index = http://www.111cn.net/js_a/javascript/0;aSpan[i].index = aUl[i].index = i;aSpan[i].onclick = function () {for(i=http://www.111cn.net/js_a/javascript/0; i<aSpan.lengthttp://www.111cn.net/js_a/javascript/h; i++) {aSpan[i].className = '';aUl[i].className = '';}thttp://www.111cn.net/js_a/javascript/his.className = 'on';aUl[thttp://www.111cn.net/js_a/javascript/his.index].className = 'on';};}};</script></http://www.111cn.net/js_a/javascript/head><body><div class="wrapper"><http://www.111cn.net/js_a/javascript/h○○@http://www.111cn.net/js_a/javascript/0$@○○>Native javascript effect: tab switch</http://www.111cn.net/js_a/javascript/h○○@http://www.111cn.net/js_a/javascript/0$@○○><div class="main"><http://www.111cn.net/js_a/javascript/h4 id="title">Jqueryjavascriptcss</http://www.111cn.net/js_a/javascript/h4><div id="con"><ul class="on"><li>Jquery tab</li><li>Jquery focus chart</li><li>Jquery form verification</li><li>Jquery special effects</li></ul><ul><li>Native javascript</li><li>Javascript special effects</li><li>Javascript notes</li></ul><ul><li>Css sprites</li><li>Css naming rules</li><li>Css font attributes</li><li>Css background attributes</li></ul></div></div></div><!-- wrapper end --></body></http://www.111cn.net/js_a/javascript/html></td> </tr></table>
Tip: you can modify some 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.