css实现轮播效果图
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> .outer{ width: 790px; height: 340px; border: 1px solid red; margin: 100px auto; position: relative; } .img{ list-style: none; padding: 0; } .img li{ position: absolute; top: 0; left: 0; } .num{ position: absolute; list-style: none; bottom: 20px; left: 300px; } .num li{ display: inline-block; width: 30px; height: 30px; background-color: white; color: black; text-align: center; line-height: 30px; border-radius: 50%; margin-left: 8px; } .num .active{ background-color: red; } .btn{ position: absolute; width: 30px; height: 60px; background-color: grey; opacity: 0.5; font-size: 28px; text-align: center; line-height: 60px; font-weight: 800; top:50%; margin-top: -30px; } .leftBtn{ left: 0; } .rightBtn{ right: 0; } .hide{ display: none; } </style> </head> <body> <div class="outer"> <ul class="img"> <li><a href=""><img src="images/JDimg/1.jpg" alt=""></a></li> <li class="hide"><a href=""><img src="images/JDimg/2.jpg" alt=""></a></li> <li class="hide"><a href=""><img src="images/JDimg/3.jpg" alt=""></a></li> <li class="hide"><a href=""><img src="images/JDimg/4.jpg" alt=""></a></li> <li class="hide"><a href=""><img src="images/JDimg/5.jpg" alt=""></a></li> </ul> <ul class="num"> <li class="active">1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> </ul> <div class="leftBtn btn"> < </div> <div class="rightBtn btn"> > </div> </div> </body> </html>
本文来自博客园,作者:一石数字欠我15w!!!,转载请注明原文链接:https://www.cnblogs.com/52-qq/p/8638284.html
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· .NET Core 托管堆内存泄露/CPU异常的常见思路
· PostgreSQL 和 SQL Server 在统计信息维护中的关键差异
· DeepSeek “源神”启动!「GitHub 热点速览」
· 我与微信审核的“相爱相杀”看个人小程序副业
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 如何使用 Uni-app 实现视频聊天(源码,支持安卓、iOS)
· C# 集成 DeepSeek 模型实现 AI 私有化(本地部署与 API 调用教程)