返回列表 发布新帖
查看: 47|回复: 0

[代码技巧] 子比主题 – 添加创意横幅图片广告位

[复制链接]
SunJu_FaceMall
社区贡献

315

主题

190

回帖

1万

积分

等级头衔
Icon组别 : 管理员
Icon等级 :

积分成就
   钻石 : 524 颗
   贡献 : 1457 点
   金币 : 12 枚
Icon在线时间 : 1294 小时
Icon注册时间 : 2024-11-22
Icon最后登录 : 2025-10-29

荣誉勋章

会员LV.1会员LV.2会员LV.3会员LV.4会员LV.5会员LV.6会员LV.7会员LV.8会员LV.9会员LV.10

风云·优秀版主

飞流名人堂成员

1

实名认证 手机认证 vip vip-year FLLTCN发表于 2025-10-6 19:59:57 | 查看全部 |阅读模式 浙江金华

资源无需等待,交易就趁现在,全面资源整合网络大咖云集,让你轻松玩转互联网!

您需要 登录 才可以下载或查看,没有账号?立即注册

×
这是一款子比主图创意横幅图片广告位,点击之后可以直达到会员页面,鼠标放到横幅上可以显示右上角联系我们,我觉得还是比较不错的一款广告美化,喜欢的自行部署!
效果展示
image.webp
代码部署
代码就两部分,很简单,第一步我们把下面的代码放到:WP后台–>>外观–>>小工具–>>自定义HTML即可
  1. <div class="n_banner_inner">
  2.   <div class="img-info">!
  3.     <div class="info">也想出现在这里?
  4.       <a rel="nofollow noopener noreferrer" href="/" target="_blank">联系我们</a>吧</div>
  5.   </div>
  6.   <a href="=/user" target="_blank" rel="noopener noreferrer">
  7.     <div class="Banner-adTag">广告</div>
  8.    
  9.   </a>
  10. </div>
复制代码
第二步我们我们将代码放到:子比主题–>>自定义CSS样式即可!
  1.     /*定位*/
  2.     .n_banner_inner {
  3.         position: relative;
  4.     }
  5.     /*提示信息*/
  6.     .n_banner_inner .img-info {
  7.         position: absolute;
  8.         right: 12px;
  9.         top: 9px;
  10.         padding: 0;
  11.         text-align: right;
  12.         color: #fff;
  13.     }
  14.     .n_banner_inner .img-info i {
  15.         position: relative;
  16.         display: inline-block;
  17.         color: #007bff;
  18.         font-size: 20px;
  19.         line-height: 19px;
  20.         text-align: center;
  21.         z-index: 9;
  22.         font-style: inherit;
  23.     }
  24.     .n_banner_inner .img-info .info {
  25.         position: absolute;
  26.         bottom: 5px;
  27.         right: 0;
  28.         width: 0;
  29.         padding: 5px 0;
  30.         overflow: hidden;
  31.         background: #007bff;
  32.         border-radius: 10px;
  33.         line-height: 10px;
  34.         text-align: center;
  35.         font-size: 10px;
  36.         color: #fff;
  37.         white-space: nowrap;
  38.         -webkit-transition: all 0.2s cubic-bezier(0, 0.34, 0.71, 1.26) !important;
  39.         -moz-transition: all 0.2s cubic-bezier(0, 0.34, 0.71, 1.26) !important;
  40.         -ms-transition: all 0.2s cubic-bezier(0, 0.34, 0.71, 1.26) !important;
  41.         -o-transition: all 0.2s cubic-bezier(0, 0.34, 0.71, 1.26) !important;
  42.         transition: all 0.2s cubic-bezier(0, 0.34, 0.71, 1.26) !important;
  43.     }
  44.     .n_banner_inner .img-info .info a {
  45.         color: #fff;
  46.     }
  47.     .n_banner_inner .tirr {
  48.         max-width: 100%;
  49.         height: auto;
  50.         transition: 0.5s;
  51.         border-radius: 5px;
  52.     }
  53.     /*触发Hover*/
  54.     .n_banner_inner:hover .info {
  55.         width: auto;
  56.         padding: 5px 23px 5px 12px;
  57.         -webkit-transition: all 0.2s cubic-bezier(0, 0.34, 0.71, 1.26) !important;
  58.         -moz-transition: all 0.2s cubic-bezier(0, 0.34, 0.71, 1.26) !important;
  59.         -ms-transition: all 0.2s cubic-bezier(0, 0.34, 0.71, 1.26) !important;
  60.         -o-transition: all 0.2s cubic-bezier(0, 0.34, 0.71, 1.26) !important;
  61.         transition: all 0.2s cubic-bezier(0, 0.34, 0.71, 1.26) !important;
  62.         font-size: 12px;
  63.         z-index: 1;
  64.     }
  65.     .n_banner_inner img:hover {
  66.         filter: brightness(50%);
  67.     }
  68.     /*出发声明hover*/
  69.     .n_banner_inner .info:hover a {
  70.         color: red;
  71.         text-decoration: none;
  72.     }
  73.     /*左下角广告*/
  74.     .n_banner_inner .Banner-adTag {
  75.         position: absolute;
  76.         left: 5px;
  77.         bottom: 5px;
  78.         width: 50px;
  79.         border: 1px solid #ebebeb;
  80.         border-radius: 3px;
  81.         color: #ebebeb;
  82.         opacity: 0.5;
  83.         font-size: 12px;
  84.         line-height: 20px;
  85.         text-align: center;
  86.     }
  87.     @media screen and (max-width: 768px) {
  88.         .n_banner_inner .img-info {
  89.             display: none;
  90.         }
  91.     }
  92.   .container {
  93.     width: 100%;
  94. }
  95. .zib-widget {
  96.     clear: both;
  97.     background: var(--main-bg-color);
  98.     padding: 0px;
  99.     box-shadow: 0 0 0px var(--main-shadow);
  100.     border-radius: var(--main-radius);
  101.     margin-bottom: 20px;
  102. }
复制代码

本帖被以下淘专辑推荐:

路虽远,行则将至;事虽难,做则必成。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

飞流广播+ 发布

系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
10-30 17:02
系统消息:柒沐已经连续答对10道难题,逆天学霸谁与争锋?!#每日答题#
10-09 09:07
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
09-24 09:00
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
09-11 11:40
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
09-02 09:17
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
08-27 08:56
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
08-20 15:12
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
08-03 10:22
系统消息:柒沐已经连续答对10道难题,逆天学霸谁与争锋?!#每日答题#
06-30 08:57
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
06-18 09:14
系统消息:清风网络已经连续答对10道难题,逆天学霸谁与争锋?!#每日答题#
04-11 09:40
系统消息:清风网络已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
04-10 09:31
系统消息:IXM77777已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
04-09 13:44
系统消息:清风网络已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
04-09 09:22
系统消息:柒沐已经连续答对10道难题,逆天学霸谁与争锋?!#每日答题#
04-09 08:52
系统消息:清风网络已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
04-08 09:24
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
04-07 09:02
系统消息:柒沐已经连续答对10道难题,逆天学霸谁与争锋?!#每日答题#
02-27 09:35
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
02-26 09:06
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
02-25 08:49
站内通告

提供资源交易、信息共享、靓号交流、技术变现、学习问答、兴趣娱乐等全面服务。

1.丰富功能系统,扩展社区特色玩法,打造最好的互联网聚集圈子。

2.准确信息真实交易,安全快捷又方便,让虚拟交易面对面。

3. 天上不会掉馅饼,话术骗术迷人心,切勿脱离平台线下交易,被骗与平台无关!

4. 欺诈骗钱,违规违法将视情受到警告&禁言&封号甚至检举至👮🏻‍♀️处理!

官方Q群:123129钉推群:BAYR2383 站长QQ:3220000000

投诉/建议/商务合作联系

fl@fllt.cn

严禁私下交易,被骗与本站无关。
违反交易细则,取证立查严惩。
  • 钉钉新帖推送群
  • 官方交流QQ群
  • 站长唯一微信号

👮曝光Ta|🧿小黑屋|📴手机页|飞流网 ( 渝ICP备2025054677号-1|电信增值许可 渝B2-20250789 )|网站地图

GMT+8, 2025-11-8 02:48 , Processed in 0.088310 second(s), 62 queries, MemCached On , Gzip On.

Based on XJ-TX X3.5 Licensed

飞流论坛 HanAnalytics icp Astro vhAstro-Theme

关灯 在本版发帖
扫一扫添加微信客服
QQ客服返回顶部
快速回复 返回顶部 返回列表