This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.overlay{ /*用于遮挡背景*/ | |
position: fixed; | |
top: 0; | |
right: 0; | |
bottom: 0; | |
left: 0; | |
background: rgba(0,0,0,.8); | |
} | |
.lightbox{ /*用于吸引用户注意的元素*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getElementByClassName (node,classname) { | |
if (node.getElementByClassName) { | |
return node.getElementByClassName(classname); | |
} else { | |
var elems = getElementByTagName("*"); | |
var results = []; | |
for (var i = 0; i < elems.length; i++) { | |
if (elems[i].className.indexOf(classname) != -1) { | |
results.push(elems[i]); | |
} |