TypechoJoeTheme

赵墨轩部落格

[资讯杂谈]分享一个通用型html+css对联广告位代码

html代码

<div class="J_index_wall index-wall-left index-wall-fixed"><a href="></a></div>
<div class="J_index_wall index-wall-right index-wall-fixed"><a href=""></a></div>

css样式代码

.index-wall-left {
    width: 350px;
    height: 528px;
    position: absolute;
    top: 120px;
    margin-left: -366px;
    background: url(https://eimg.smzdm.com/201912/23/5e005a69169374667.png) no-repeat right top;
    background-size: contain;
    z-index: 10;
}
.index-wall-right {
    width: 350px;
    height: 528px;
    position: absolute;
    top: 120px;
    margin-left: 1140px;
    background: url(https://eimg.smzdm.com/201912/23/5e005a6dcfa5a5135.png) no-repeat left top;
    background-size: contain;
    z-index: 10;
}
.index-wall-fixed {
    position: fixed;
}

效果图

赞(0)
评论 (0)