四分五裂布局

CSS

<style type="text/css">
ul, ol, li {
    list-style-type: none;
    margin: 0;
    padding: 0;
}
</style>

<style type="text/css">
.ebox {
    width: 500px;
    height: 100%;
    display: table;
    border: 1px solid #DDD;
}
.ebox-i {
    position: relative;
    float: left;
    width: 50%;
    padding: 15px 15px 20px;
    color: #777;
    border-bottom: 1px dashed #DDD;
    font-size: 12px;
    text-align: center;
    line-height: 1.42857;
}

.ebox-i:hover {
    background-color: #F9F9F9;
}

.ebox-01, .ebox-03 {
    border-right: 1px dashed #DDD;
}

.ebox-100 {
    width: 100%;
    margin-bottom: 0px;
    border-bottom: medium none;
}
</style>

JS

<script type="text/javascript">
    $(".ebox-i").each(function() {
        $(this).hover(
            function() {
                $(this).find(".desc").animate({height: '100%', opacity: 'show'});
            },
            function() {
                $(this).find(".desc").animate({height: '0', opacity: 'hide'});
            }
        );
    });
</script>

页面

<ul class="ebox">
    <li class="ebox-i ebox-01">
        <h4>视觉中国</h4>
        <p>视觉创意产业门户</p>
    </li>
    <li class="ebox-i ebox-02">
        <h4>视觉中国</h4>
        <p>视觉创意产业门户</p>
    </li>
    <li class="ebox-i ebox-03">
        <h4>视觉中国</h4>
        <p>视觉创意产业门户</p>
    </li>
    <li class="ebox-i ebox-04">
        <h4>视觉中国</h4>
        <p>视觉创意产业门户</p>
    </li>
    <li class="ebox-i ebox-100">
        <h4>主题定制</h4>
        <p>完全按照您的需求量身打造,此项服务需要排期,具体请联系我们</p>
        <a class="btn btn-danger" href="">联系我们</a>
    </li>
</ul>

显示效果

这里写图片描述

这里写图片描述

这里写图片描述

这里写图片描述

这里写图片描述

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值