WEB代码:jiuxian特效-鼠标滑过,上下页面同时显示


html

<div class="crazySale">
        <!-- 左侧 -->
        <div class="indexTabBox">
            <!-- 上 -->
            <div class="indexTabNav">
                <ul>
                    <li class="on">
                        疯狂抢购
                    </li>
                    <li>
                        爆款推荐
                    </li>
                    <li>
                        实惠口粮
                    </li>
                    <li>
                        整箱钜惠
                    </li>
                    <li>
                        精选大牌
                    </li>
                </ul>
            </div>
            <!-- 下 -->
            <div class="indexTabConWrap">
                <div class="indexTabCon">
                    <ul class="clearfix">
                        <li>
                            <div class="indexTabPic">
                                <a href="http://www.jiuxian.com/goods-49255.html?src=4766&amp;source=51" target="_blank" title="52°白水杜康一坛老酒1000ml"><img src="http://img06.jiuxian.com/2017/1018/cacb73cdd10e46569d8b8bd5c92b1c822.jpg" alt="52°白水杜康一坛老酒1000ml" width="160" height="160">
                                </a>
                            </div>
                            <div class="indexTabTit">
                                <a href="http://www.jiuxian.com/goods-49255.html?src=4766&amp;source=51" target="_blank" title="52°白水杜康一坛老酒1000ml">
                                    <i class="zhenxuan"></i> 52°白水杜康一坛老酒1000ml
                                </a>
                            </div>
                            <div class="indexTabPrice">
                                <strong class="jxIndex_nowPrice">¥50.00</strong>
                            </div>

                        </li>
                        <li>
                            <div class="indexTabPic">
                                <a href="http://www.jiuxian.com/goods-49255.html?src=4766&amp;source=51" target="_blank" title="52°白水杜康一坛老酒1000ml"><img src="http://img06.jiuxian.com/2017/1018/cacb73cdd10e46569d8b8bd5c92b1c822.jpg" alt="52°白水杜康一坛老酒1000ml" width="160" height="160">
                                </a>
                            </div>
                            <div class="indexTabTit">
                                <a href="http://www.jiuxian.com/goods-49255.html?src=4766&amp;source=51" target="_blank" title="52°白水杜康一坛老酒1000ml">
                                    <i class="zhenxuan"></i> 52°白水杜康一坛老酒1000ml
                                </a>
                            </div>
                            <div class="indexTabPrice">
                                <strong class="jxIndex_nowPrice">¥50.00</strong>
                            </div>

                        </li>
                        <li>
                            <div class="indexTabPic">
                                <a href="http://www.jiuxian.com/goods-49255.html?src=4766&amp;source=51" target="_blank" title="52°白水杜康一坛老酒1000ml"><img src="http://img06.jiuxian.com/2017/1018/cacb73cdd10e46569d8b8bd5c92b1c822.jpg" alt="52°白水杜康一坛老酒1000ml" width="160" height="160">
                                </a>
                            </div>
                            <div class="indexTabTit">
                                <a href="http://www.jiuxian.com/goods-49255.html?src=4766&amp;source=51" target="_blank" title="52°白水杜康一坛老酒1000ml">
                                    <i class="zhenxuan"></i> 52°白水杜康一坛老酒1000ml
                                </a>
                            </div>
                            <div class="indexTabPrice">
                                <strong class="jxIndex_nowPrice">¥50.00</strong>
                            </div>

                        </li>
                        <li>
                            <div class="indexTabPic">
                                <a href="http://www.jiuxian.com/goods-49255.html?src=4766&amp;source=51" target="_blank" title="52°白水杜康一坛老酒1000ml"><img src="http://img06.jiuxian.com/2017/1018/cacb73cdd10e46569d8b8bd5c92b1c822.jpg" alt="52°白水杜康一坛老酒1000ml" width="160" height="160">
                                </a>
                            </div>
                            <div class="indexTabTit">
                                <a href="http://www.jiuxian.com/goods-49255.html?src=4766&amp;source=51" target="_blank" title="52°白水杜康一坛老酒1000ml">
                                    <i class="zhenxuan"></i> 52°白水杜康一坛老酒1000ml
                                </a>
                            </div>
                            <div class="indexTabPrice">
                                <strong class="jxIndex_nowPrice">¥50.00</strong>
                            </div>

                        </li>
                        <li>
                            <div class="indexTabPic">
                                <a href="http://www.jiuxian.com/goods-49255.html?src=4766&amp;source=51" target="_blank" title="52°白水杜康一坛老酒1000ml"><img src="http://img06.jiuxian.com/2017/1018/cacb73cdd10e46569d8b8bd5c92b1c822.jpg" alt="52°白水杜康一坛老酒1000ml" width="160" height="160">
                                </a>
                            </div>
                            <div class="indexTabTit">
                                <a href="http://www.jiuxian.com/goods-49255.html?src=4766&amp;source=51" target="_blank" title="52°白水杜康一坛老酒1000ml">
                                    <i class="zhenxuan"></i> 52°白水杜康一坛老酒1000ml
                                </a>
                            </div>
                            <div class="indexTabPrice">
                                <strong class="jxIndex_nowPrice">¥50.00</strong>
                            </div>

                        </li>
                        <li>
                            <div class="indexTabPic">
                                <a href="http://www.jiuxian.com/goods-49255.html?src=4766&amp;source=51" target="_blank" title="52°白水杜康一坛老酒1000ml"><img src="http://img06.jiuxian.com/2017/1018/cacb73cdd10e46569d8b8bd5c92b1c822.jpg" alt="52°白水杜康一坛老酒1000ml" width="160" height="160">
                                </a>
                            </div>
                            <div class="indexTabTit">
                                <a href="http://www.jiuxian.com/goods-49255.html?src=4766&amp;source=51" target="_blank" title="52°白水杜康一坛老酒1000ml">
                                    <i class="zhenxuan"></i> 52°白水杜康一坛老酒1000ml
                                </a>
                            </div>
                            <div class="indexTabPrice">
                                <strong class="jxIndex_nowPrice">¥50.00</strong>
                            </div>

                        </li>
                        <li>
                            <div class="indexTabPic">
                                <a href="http://www.jiuxian.com/goods-49255.html?src=4766&amp;source=51" target="_blank" title="52°白水杜康一坛老酒1000ml"><img src="http://img06.jiuxian.com/2017/1018/cacb73cdd10e46569d8b8bd5c92b1c822.jpg" alt="52°白水杜康一坛老酒1000ml" width="160" height="160">
                                </a>
                            </div>
                            <div class="indexTabTit">
                                <a href="http://www.jiuxian.com/goods-49255.html?src=4766&amp;source=51" target="_blank" title="52°白水杜康一坛老酒1000ml">
                                    <i class="zhenxuan"></i> 52°白水杜康一坛老酒1000ml
                                </a>
                            </div>
                            <div class="indexTabPrice">
                                <strong class="jxIndex_nowPrice">¥50.00</strong>
                            </div>

                        </li>
                        <li>
                            <div class="indexTabPic">
                                <a href="http://www.jiuxian.com/goods-49255.html?src=4766&amp;source=51" target="_blank" title="52°白水杜康一坛老酒1000ml"><img src="http://img06.jiuxian.com/2017/1018/cacb73cdd10e46569d8b8bd5c92b1c822.jpg" alt="52°白水杜康一坛老酒1000ml" width="160" height="160">
                                </a>
                            </div>
                            <div class="indexTabTit">
                                <a href="http://www.jiuxian.com/goods-49255.html?src=4766&amp;source=51" target="_blank" title="52°白水杜康一坛老酒1000ml">
                                    <i class="zhenxuan"></i> 52°白水杜康一坛老酒1000ml
                                </a>
                            </div>
                            <div class="indexTabPrice">
                                <strong class="jxIndex_nowPrice">¥50.00</strong>
                            </div>

                        </li>
                        <li>
                            <div class="indexTabPic">
                                <a href="http://www.jiuxian.com/goods-49255.html?src=4766&amp;source=51" target="_blank" title="52°白水杜康一坛老酒1000ml"><img src="http://img06.jiuxian.com/2017/1018/cacb73cdd10e46569d8b8bd5c92b1c822.jpg" alt="52°白水杜康一坛老酒1000ml" width="160" height="160">
                                </a>
                            </div>
                            <div class="indexTabTit">
                                <a href="http://www.jiuxian.com/goods-49255.html?src=4766&amp;source=51" target="_blank" title="52°白水杜康一坛老酒1000ml">
                                    <i class="zhenxuan"></i> 52°白水杜康一坛老酒1000ml
                                </a>
                            </div>
                            <div class="indexTabPrice">
                                <strong class="jxIndex_nowPrice">¥50.00</strong>
                            </div>

                        </li>
                        <li>
                            <div class="indexTabPic">
                                <a href="http://www.jiuxian.com/goods-49255.html?src=4766&amp;source=51" target="_blank" title="52°白水杜康一坛老酒1000ml"><img src="http://img06.jiuxian.com/2017/1018/cacb73cdd10e46569d8b8bd5c92b1c822.jpg" alt="52°白水杜康一坛老酒1000ml" width="160" height="160">
                                </a>
                            </div>
                            <div class="indexTabTit">
                                <a href="http://www.jiuxian.com/goods-49255.html?src=4766&amp;source=51" target="_blank" title="52°白水杜康一坛老酒1000ml">
                                    <i class="zhenxuan"></i> 52°白水杜康一坛老酒1000ml
                                </a>
                            </div>
                            <div class="indexTabPrice">
                                <strong class="jxIndex_nowPrice">¥50.00</strong>
                            </div>

                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <!-- 右侧 -->
        <div class="indexTabRight">

        </div>
        <h1>11111111111111111</h1>
        <h1>11111111111111111</h1>
        <h1>11111111111111111</h1>
        <h1>11111111111111111</h1>

        <h1>11111111111111111</h1>
        <h1>11111111111111111</h1>
        <h1>11111111111111111</h1>
        <h1>11111111111111111</h1>
        <h1>11111111111111111</h1>
    </div>

CSS

.crazySale {
    width: 1200px;
    position: relative;
    z-index: 1;
    margin: 0 auto;
    margin-top: 10px;
}

.indexTabBox {
    width: 920px;
    height: 499px;
    float: left;
    /* background: rgb(61, 14, 190); */
}

.indexTabRight {
    width: 270px;
    height: 500px;
    float: left;
    /* background: rgb(202, 27, 35); */
}

.indexTabNav li {
    background: #f9f9f9;
    list-style: none;
    width: 182px;
    height: 35px;
    float: left;
    line-height: 35px;
    text-align: center;
    cursor: pointer;
    color: #666;
    font-size: 16px;
    font-family: 微软雅黑;
    border-left: 1px solid #ececec;
    border-right: 1px solid #ececec;
    border-bottom: 1px solid #ececec;
    border-top: 2px solid #ececec;
}

.crazySale .on {
    border-top: 2px solid #cc0000;
    border-bottom: 1px solid #fff;
    color: #cc0000;
    background: #fff;
}

.crazySale .indexTabConWrap {
    height: 460px;
    border: 1px solid #ececec;
    border-top: none;
    overflow: hidden;
    background: #fff;
}

.crazySale .indexTabConWrap .indexTabCon {
    width: 910px;
    height: 442px;
    margin: 0 auto;
    padding: 10px 0;
    position: relative;
    overflow: hidden;
    background: #fff;
    /* display: none; */
}

.crazySale .indexTabConWrap .indexTabCon .clearfix li {
    width: 182px;
    float: left;
    margin-top: 20px;
    list-style: none;
}

.crazySale .indexTabConWrap .indexTabPic {
    padding: 0 11px;
    width: 160px;
    position: relative;
    z-index: 1;
}

.indexTabTit {
    padding: 0 6px;
    width: 170px;
    height: 18px;
    line-height: 18px;
    /* 文本多,显示省略符号 */
    text-overflow: ellipsis;
    overflow: hidden;
    /* 文本多,不换行 */
    white-space: nowrap;
}

.indexTabPrice {
    padding: 0 6px;
    width: 170px;
    height: 18px;
    line-height: 18px;
    overflow: hidden;
    /* 文本多,不换行 */
    white-space: nowrap;
}

.indexTabTit a {
    color: #666;
    text-decoration: none;
    font-size: 12px;
}

.indexTabTit .zhenxuan {
    float: left;
    width: 72px;
    height: 16px;
    background: url("../img/zhenxuan.jpg") no-repeat top center;
    margin-right: 5px;
}

.indexTabPrice .jxIndex_nowPrice {
    font-family: 微软雅黑;
    font-size: 12px;
    color: #CD0100;
    /* normal 	默认值。定义标准的字符。 */
    font-weight: normal;
    line-height: 18px;
    /* 此元素会被显示为内联元素,元素前后没有换行符。 */
    display: inline;
    /* 把此元素放置在父元素的中部。 */
    vertical-align: middle;
}

JS

// 疯狂抢购-上特性
    $('.crazySale .indexTabNav ul li').mouseenter(function() {
        // alert('1');
        $('.crazySale .indexTabNav ul li').removeClass('on');
        $(this).addClass('on');

        // 疯狂抢购-上下互动
        var idx = $(this).index('.crazySale .indexTabNav ul li');
        $(".indexTabConWrap .indexTabCon").hide();
        $(".indexTabConWrap .indexTabCon").eq(idx).show();


    })

**



**



**



**



**



**



**



**



**



**



**



**



**



**



**



**



**



**



**



**



**



**



**



**



**


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值