This file contains hidden or 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
| @media screen and (-webkit-min-device-pixel-ratio:0) { | |
| .demo { | |
| color: #f36; | |
| } | |
| } |
This file contains hidden or 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
| /* 支持所有firefox版本 */ | |
| #selector[id=selector] { property: value; } | |
| @-moz-document url-prefix() { | |
| .selector { property: value; } | |
| } | |
| /* 支持所有Gecko内核的浏览器 (包括Firefox) */ | |
| *>.selector { property: value; } |
This file contains hidden or 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
| /* | |
| <div class="arrow-up"></div> | |
| <div class="arrow-down"></div> | |
| <div class="arrow-left"></div> | |
| <div class="arrow-right"></div> | |
| */ | |
| .arrow-up { | |
| width: 0; | |
| height: 0; |
This file contains hidden or 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
| .inlineblock{ | |
| display:inline-block; | |
| *display:inline; | |
| *zoom:1; | |
| } |
This file contains hidden or 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
| <!--[if IE 6]> | |
| <script type="text/javascript"> | |
| document.execCommand("BackgroundImageCache",false,true); | |
| </script> | |
| <![endif]--> |
This file contains hidden or 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
| selector { | |
| min-height:500px; | |
| height:auto !important; | |
| height:500px; | |
| } |
This file contains hidden or 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
| //直接操作需要的元素 | |
| var container = document.getElementById(elementId); | |
| container.style.width = (container.clientWidth > (width - 1)) ? width + "px" : "auto"; | |
| //定义函数,多次调用 | |
| function setMaxWidth(elementId, width){ | |
| var container = document.getElementById(elementId); | |
| container.style.width = (container.clientWidth > (width - 1)) ? width + "px" : "auto"; | |
| } | |
| //调用函数 |
This file contains hidden or 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
| ////直接操作需要的元素 | |
| var container = document.getElementById('container'); | |
| container.style.width = (container.clientWidth < width) ? "500px" : "auto"; | |
| //定义函数,多次调用 | |
| function setMinWidth(elementId, width){ | |
| var container = document.getElementById(elementId); | |
| container.style.width = (container.clientWidth < width) ? width + "px" : "auto"; | |
| } | |
| //调用函数 |
This file contains hidden or 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
| //直接操作需要的元素 | |
| var container = document.getElementById('container'); | |
| container.style.height = (container.scrollHeight > 199) ? "200px" : "auto"; | |
| //定义函数,多次调用 | |
| function setMaxHeight(elementId, height){ | |
| var container = document.getElementById(elementId); | |
| container.style.height = (container.scrollHeight > (height - 1)) ? height + "px" : "auto"; | |
| } | |
| //调用函数 |
This file contains hidden or 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
| var ev = { | |
| addHandler : function(e, ev, fn){ | |
| e.addEventListener ? e.addEventListener(ev, fn, false) : (e["_"+ev+fn] = fn, e[ev+fn] = function(){ e["_"+ev+fn]() }, e.attachEvent("on"+ev, e[ev+fn])); | |
| }, | |
| removeHandler : function(e, ev, fn){ | |
| e.removeEventListener ? e.removeEventListener(ev, fn, false) : e.detachEvent(ev,e[ev+fn]); | |
| }, | |
| addLoadHandler : function(fn){ |