页面底部悬浮广告或关注公众号代码

本文介绍了一种网页底部固定的广告栏设计方法,通过使用CSS样式实现广告栏的固定位置展示,并确保其在各种屏幕尺寸下都能良好显示。文章详细展示了如何设置广告栏的位置、大小、背景颜色等属性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

代码如下

<style>
.margingT {
margin-bottom: 60px;
}

.bottomAD {
-webkit-box-sizing: border-box;
height: 80px;
position: fixed;
bottom: 0;
left: 0;
z-index: 1000;
padding: 0 10px;
overflow: hidden;
width: 100%;
background: rgba(0, 0, 0, .8);
}

.bottom-pic {
position: absolute;
top: 10px;
width: 60px;
height: 60px;
overflow: hidden;
-webkit-border-radius: 10px;
border-radius: 10px;
}

.bottom-pic img {
width: 100%;
height: 100%;
}

.bottom-text {
margin-left: 70px;
line-height: 80px;
font-size: 16px;
color: #fff;
}

.bottom-btn {
position: absolute;
top: 20px;
right: 10px;
height: 40px;
line-height: 40px;
color: #fff;
background-color: #60b900;
border-radius: 6px;
text-align: center;
font-size: 16px;
padding: 0 5px;
font-weight: bold;
}

.bottomAD a {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}

</style>
<div class="bottomAD" id="bottomAD">

<div class="bottom-con">
<div class="bottom-pic">
<img src="http://pic.kuaizhan.com/g1/M01/71/9C/wKjmqVbSY2GAWNvZAABPOdnuH1Q1142811" width="60" height="60" alt="">
</div>
<div class="bottom-text" id="bottomText">"爱分享只分享值得的</div>
<div class="bottom-btn">立即关注</div>
</div>
<a id="bottomLink" href=" http://zygxsq.kuaizhan.com"></a>
</div>



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小小鱼儿小小林

赞赏是鼓励,点赞是美意

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值