日期:2014-05-17  浏览次数:20666 次

background-position在td里不显示背景的问题。
用background-position显示背景图,在div里显示正常,放到td里就什么都不显示了。请大家帮忙看看。
代码贴出,使用的图片也贴出来了。


<style type="text/css">
    #div_WS10_root .LeftBracket {
        background-image: url(../Images/Mental/codingOver8.jpg);
        background-attachment: fixed;
        background-repeat: no-repeat;
        background-position: -45px 10px;
        width: 45px;
        height: 45px;
        display: block;
        border: 1px solid green;
    }

    #div_WS10_root .RightBracket {
        background-image: url(../Images/Mental/codingOver8.jpg);
        background-attachment: fixed;
        background-repeat: no-repeat;
        background-position: 0px 10px;
        width: 45px;
        height: 45px;
        display: block;
        border: 1px solid green;
    }

    #table_sample {
        width:405px;
    }
    #table_sample tr td {
        text-align: center;
        vertical-align: middle;
        border-color:#ddd;
        padding:0px;
        margin:0px;
        width:45px;
        height:45px;
        border:1px solid black;
    }
 
</style>

<div id="div_WS10_root">

      <div class="RightBracket"></div>
    <div>

        <div>
            <div class="button-set">
                <button id="btn_WS10_Start" name="btnStart">计时开始</button>
                <label id="label_WS10_problemTimer" group="problemTimer" style="margin-left: 20px; font-weight: bold;">00:00:00</label>
            </div>

            <div>
            </div>

            <table id="table_sample">
                &