CSS

By admin, 25 二月, 2015

display: inline-block;

*display: inline; // 星号表示专用于IE7及以下的浏览器

zoom: 1;

 

还可以考虑加入引用改CSS的条件(但不是必须)

<!–-[if IE 7]>

<link rel="stylesheet" href="ie7.css" type="text/css" />

<![endif]–->

 

标签

By admin, 16 二月, 2015

 
function css(a) {
    var sheets = document.styleSheets, o = {};
    for (var i in sheets) {
        var rules = sheets[i].rules || sheets[i].cssRules;
        for (var r in rules) {
            if (a.is(rules[r].selectorText)) {
                o = $.extend(o, css2json(rules[r].style), css2json(a.attr('style')));
            }
        }

标签

By admin, 16 二月, 2015

tr:nth-child(even) { background-color: #000000; }

以上方法不适用于IE8及以下版本。

也可用通过jQuery的方法实现:

$(document).ready(function() {

  $("tr:even").css("background-color", "#000000");

});

标签

By admin, 16 二月, 2015

 
function css(a) {
    var sheets = document.styleSheets, o = {};
    for (var i in sheets) {
        var rules = sheets[i].rules || sheets[i].cssRules;
        for (var r in rules) {
            if (a.is(rules[r].selectorText)) {
                o = $.extend(o, css2json(rules[r].style), css2json(a.attr('style')));
            }
        }

标签

By admin, 15 二月, 2015

pre {
    white-space: pre-wrap;       /* CSS 3 */
    white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
    white-space: -pre-wrap;      /* Opera 4-6 */
    white-space: -o-pre-wrap;    /* Opera 7 */
    word-wrap: break-word;       /* Internet Explorer 5.5+ */
}

标签

最新评论