Cov ntawv qhia zaub mov nrog ntu poob qis hauv ntu yog siv nyob rau hauv qhov chaw kom ntau dua qhia meej cov qauv ntawm ntu thiab ntu, thaum txuag qhov chaw nplooj ntawv. Nws tsis yog li nyuaj rau kev siv xws li kev ua: ib qho ntawm cov qauv coj ua raug muab rau hauv kab lus.
Cov Lus Qhia
Kauj ruam 1
Hauv qab no yog qhov ua tiav ntawm kab ntawv ntawm nplooj ntawv. Cov lus piav qhia ntawm cov cwj pwm raug tso ncaj qha rau hauv cov ntawv ntawm nplooj. Tsis yog qhov html lossis tsis yog css ntawm qhov kev hloov pauv ntawm qhov kev siv ntawv qhia zaub mov muaj cov kev tsim ub no uas yuav tsum tau piav qhia kom ntxaws.
Kauj ruam 2
<! DOCTYPE html PUBLIC "- // W3C // DTD XHTML 1.0 Transitional // EN"
"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Cov ntawv qhia zaub mov yooj yim nrog cov seem
* {
font-tsev neeg: arial;
font-loj: 16px;
}
/ * rau cov IE browsers loj dua * /
lub cev {tus cwj pwm: url ("csshover.htc");}
ul, lis, ib {
tso saib: thaiv;
cov npoo: 0;
padding: 0;
ciam teb: 0;
}
ul {
dav: 150px;
ciam teb: 1px khoom nyiaj;
tom qab: dawb;
npe-style: tsis muaj;
}
lis {
txoj hauj lwm: tus txheeb ze;
padding: 1px;
xim tom qab: nyiaj;
z-Performance index: 9;
}
li.folder {tom qab xim: nyiaj;}
li.folder ul {
txoj hauj lwm: txog;
laug: 111px; / * IE tsuas * /
saum: 5px;
}
li.folder> ul {sab laug: 140px;} / * rau lwm tus * /
a {
padding: 2px;
ciam teb: 1px khoom dawb;
kho kom zoo nkauj ntawv: tsis muaj;
xim: Dub;
font-yuag: bold;
dav: 100%; / * rau IE * /
}
li> a {dav: pib;} / * rau lwm tus * /
lis a {
tso saib: thaiv;
dav: 140px;
}
lis a.submenu {
xim tom qab: daj;
}
/ * Tshooj * /
a: yuj {
ciam teb-xim: txho;
xim tom qab: liab;
xim: dub;
}
li.folder a: yuj {
xim tom qab: liab;
}
/ * Ntu * /
li.folder: yuj {z-Performance index: 10;}
ul ul, lis: hover ul ul {zaub: tsis muaj;}
lis: yuj ul, lis: yuj lis: yuj ul {zaub: thaiv;}
- 1. Tshooj Lus
-
2. Seem
- 2.1 Tshooj
-
2.2 Ntu
- 2.2.1 Tshooj
- 2.2.2 Tshooj
- 2.2.3 Tshooj
- 2.3 Tshooj
-
3. Tshooj lus
- 3.1 Tshooj Lus
- 3.2 Tshooj
- 3.3 Tshooj
- 4. Tshooj Lus
Kauj ruam 3
Yog tias koj xav siv qhov kev xaiv los txhawb kev twb dhau los ua kev hloov kho browser, tom qab ntawd ib txoj kab ntxiv yuav tsum raug ntxiv rau cov lus piav qhia style (tam sim ntawd tom qab) (koj tsis tas yuav ntxiv ib qho kev tawm tswv yim):
/ * rau cov IE browsers loj dua * /
lub cev {tus cwj pwm: url ("csshover.htc");}
Kauj ruam 4
Tom qab ntawd tsim nplooj ntawv cais, cov ntsiab lus ntawm uas tau qhia hauv qab no.
window. CSSHover = (muaj nuj nqi () {var m = / (^ | | s) ((((^ ^]) () (a ([^ #.] [^] +) +)):(hover | nquag | tsom)) / i; var n = / (. *?):(hover | nquag | tsom) / i; var o = / [^:] +: ([az / -] +). * / i; var p = / (. ([a-z0-9 _ / -] +): [az] +) | (: [az] +) / gi; var q = / \. ([a-z0-9 _ / -] * on (hover | nquag | tsom)) / i; var s = / msie (5 | 6 | 7) / i; var t = / backcompat / i; var u = {index: 0, sau: ['ntawv-kashida', 'ntawv-kashida-chaw', 'ntawv-qhia qhov tseeb'], tau: muaj nuj nqi () {rov qab this.list [(this.index ++)% no. list.length]}}; var v = muaj nuj nqi (c) {rov qab c.replace (/-(.)/ mg, muaj nuj nqi (a, b) {rov qab b.toUpperCase ()})}; var w = {ntsiab: , callbacks: {}, init: function () {yog (! s.test (navigator.userAgent) &&! t.test (window.document.compatMode)) {rov qab} var a = window.document.styleSheets, l = a.length; rau (var i = 0; kuv <l; i ++) {this.parseStylesheet (a )}}, parseStylesheet: muaj nuj nqi (a) {yog (a.imports) {sim {var b = a. import; var l = b.length; rau (var i = 0; kuv <l; i ++) {this.parseStylesheet (a.imports )}} ntes (securityException) {} } sim {var c = a. cov cai; var r = c.length; rau (var j = 0; j <r; j ++) {this.parseCSSRule (c [j,, a)} ca tch (someException) {}}, parseCSSRule: function (a, b) {var c = a.selectorText; yog (m.test (c)) {var d = a.style.cssText; var e = n.exec (c) [1]; var f = c.replace (o, 'ntawm $ 1'); var g = c.replace (p, '. $ 2' + f); var h = q.exec (g) [1]; var i = e + h; yog (! This.callbacks ) {var j = u.get (); var k = v (j); b.addRule (e, j + ': qhia (CSSHover (qhov no, "'+ f +'", "'+ h +'", "'+ k +'")) '); this.callbacks = tseeb} b.addRule (g, d)} }, thaj: muaj nuj nqi (a, b, c, d) {sim {var f = a.parentNode.currentStyle [d]; a.style [d] = f} ntes (e) {a.runtimeStyle [d] = ''} yog (! a.csshover) {a.csshover = } yog (! a.csshover [c]) {a.csshover [c] = muaj tseeb; var g = CSSHoverElement tshiab (a, b, c); this.elements.push (g)} rov qab b}, unload: function () {sim {var l = this.elements.length; rau (var i = 0; kuv <l; kuv ++) {this.elements .unload ()} this.elements =; this.callbacks = {}} ntes (e) {}}}; var x = {onhover: {activator: 'onmouseenter', deactivator: 'onmouseleave'}, onactive: {activator: 'onmousedown', deactivator: 'onmouseup'}, onfocus: {activator: 'onfocus', deactivator: 'onblur'}}; muaj nuj nqi CSSHoverElement (a, b, c) {this.node = a; this.t ype = b; var d = tshiab RegExp ('(^ | / s)' + c + '(s | $)', 'g');
this.activator = muaj nuj nqi () {a.className + = '' + c}; this.deactivator = muaj nuj nqi () {a.className = a.className.replace (d, '')}; a.attachEvent (x .activator, this.activator);. activator, this.activator); this.node.detachEvent (x [this.type].deactivator, this.deactivator); this.activator = tsis raug; this.deactivator = thov; no.node = thov; no.type = thov };; window.attachEvent ('onbeforeunload', muaj nuj nqi () {w.unload ()}); rov qab muaj nuj nqi (a, b, c, d) {yog (a) {rov qab w.patch (a, b, c, d)} lwm {w.init ()}}}) ();
Kauj ruam 5
Cov nplooj ntawv no yuav tsum tau txais kev cawm nrog lub npe csshover.htc thiab muab tso rau hauv tib qho chaw ntawm nplooj ntawv tseem ceeb.