使用Javascript和CSS在IE中不出现Box Shadow和Border Radius?

时间:2014-04-22 03:47:18

标签: css internet-explorer sharepoint

我遇到了一个麻烦,在SharePoint中,Box-shadow,Border-radius和showToggle的div标签没有出现在IE中,但它在FF和Chrome中运行得非常好。

请告诉我这里出了什么问题。

Demo

HTML

<table id="showRoom">
    <tr class="box_shadow">
        <td class="text_plant_address">
            <span class="text_plant">Plant 1</span>

            <!-- <br /> <span class="text_address">Street 2, Dong An Industrial Park</span> -->
        </td>
        <td class="toggle_des">
            <div class="news_column1"> 
                <a class="link_to_book" target="_blank" href="http://google.com">
                    <span class="circle_plant">P1</span>
                    <span class="imgswap">Showroom 1</span>
                    <div class="news_img">
                        <div class="description_room">
                            <p class="info_room">Book Now!</p>
                        </div>
                    </div>
                </a>
            </div>
        </td>
        <td class="_space"></td>
    </tr>
</table>

CSS

#showRoom {
    margin-left: 10px;
    margin-top: 20px;
    width: auto;
    border-collapse: collapse;
}
table td {
    padding: 0;
}
.box_shadow {
    background-color: #FFF;
    font-size: 18px;
    line-height: 20px;
    text-align: center;
    font-weight: normal;
    font-family:'Scada', sans-serif;
    display: block;
    -webkit-box-shadow: -4px 4px 5px 0px rgba(50, 50, 50, 0.3);
    -moz-box-shadow: -4px 4px 5px 0px rgba(50, 50, 50, 0.3);
    box-shadow: -4px 4px 5px 0px rgba(50, 50, 50, 0.3);
}
.text_plant_address {
    background-color: #FFF;
    width: 150px;
    height: 150px;
    line-height: 20px;
    text-align: center;
    font-weight: normal;
    font-family:'Scada', sans-serif;
    margin: 0;
    padding: 0;
}
._space {
    width: 20px;
}
.link_to_book {
    text-decoration: none;
}
.toggle_des a:hover {
    text-decoration: none;
}
.text_plant {
    border-bottom: 1px solid #D0D0D0;
    font-family: ballpark_weiner, Arial;
    font-size: 22px;
    letter-spacing: 1px;
    padding: 0 15px;
    height: 145px;
    width: auto;
}
.text_address {
    font-size: 10px;
    font-family: Arial;
    display: block;
    position: relative;
    height: auto;
    margin-top: 5px;
}
.news_column1 {
    background-color: #FF9393;
    width: 150px;
    height: 150px;
    position: relative;
    padding-top: 15px;
    cursor: pointer;
    /*background-color: #F67C78;*/
    /*background-color: #FFF;*/
    /*border-radius: 15px;*/
}
.news_column2 {
    background-color: #E39EE4;
    width: 150px;
    height: 150px;
    position: relative;
    padding-top: 15px;
    cursor: pointer;
    /*background-color: #FFF;*/
    /*border-radius: 15px;*/
}
.news_column3 {
    background-color: #48B1F3;
    width: 150px;
    height: 150px;
    position: relative;
    padding-top: 15px;
    cursor: pointer;
    /*background-color: #FFF;*/
    /*border-radius: 15px;*/
}
.news_column4 {
    background-color: #9ACF52;
    width: 150px;
    height: 150px;
    position: relative;
    padding-top: 15px;
    cursor: pointer;
    /*background-color: #FFF;*/
    /*border-radius: 15px;*/
}
.news_img {
    width: 150px;
    height: 40px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.4);
    font-family:'Times New Roman';
    font-weight: bold;
    letter-spacing: 0.5px;
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    opacity: 0.95;
    /*border-radius: 0 0 15px 15px;*/
}
.description_room {
    width: 150px;
    height: 10px;
    margin: 0;
    padding: 0;
    display: block;
    vertical-align: middle;
}
.info_room {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    color: #FFF;
    /* transform: rotate(-10deg); */
    /* -ms-transform: rotate(-10deg); /* IE 9 */
    /* -webkit-transform: rotate(-10deg); /* Opera, Chrome, and Safari */
}
.circle_plant {
    width: 65px;
    height: 65px;
    font-size: 28px;
    color: #fff;
    line-height: 65px;
    text-align: center;
    background-color: #111111;
    opacity: 0.3;
    display: block;
    margin: 0 42.5px 0 42.5px;
    -webkit-border-radius: 32.5px;
    -moz-border-radius: 32.5px;
    border-radius: 32.5px;
}
.imgswap {
    display: block;
    opacity: 0.5;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
    font-family: sans-serif;
    font-size: 15px;
    padding-top: 5px;
    font-family: Stark;
    letter-spacing: 0.5px;
}

jquery的

$(document).ready(function () {
    $("table tr .toggle_des").hover(function (e) {
        $(this).find(".news_img").stop(true).animate({
            height: "show"
        }, 290);
        $img = $(this).find(".imgswap");
        $img.attr("src", $img.data("hover"));
    }, function () {
        $(this).find(".news_img").stop(true).animate({
            height: "hide"
        }, 290);
        $img = $(this).find(".imgswap");
        $img.attr("src", $img.data("src"));
    });

    $(".imgswap").each(function () {
        $(this).data("src", this.src);
    });
});

以下是IE和FF中的照片:

Pic

0 个答案:

没有答案