请问王者荣耀官网里面鼠标划上去就能弹出下面这些的 然后bannar图下面云雾的效果咋做的哇 求解答
2条回答 默认 最新
- AReTrnA 2022-03-17 07:24关注
这应该是你要的效果:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> nav { list-style: none; width: 100vw; height: 84px; position: absolute; top: 0; left: 0; background: rgba(0, 0, 0, 0.3); } .outer { color: white; } .inner { width: 100vw; height: 0px; overflow: hidden; transition: height 0.3s; background-color: rgba(0, 0, 0, 0.2); position: absolute; top: 84px; left: 0; } nav:hover .inner { height: 200px; } </style> </head> <body> <nav> <div class="outer"> <div class="inner"></div> </div> </nav> </body> </html>
而banner图下面的云雾你指的可能是那个渐变?
那个是本身在图片上的 (扒了它图片出来)
http://ossweb-img.qq.com/upload/webplat/info/yxzj/20220310/595261080931510.jpg当然css也可以做
有用采纳
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报 编辑记录