weixin_38422826 2017-10-28 04:00 采纳率: 0%
浏览 1691

悬停效果 白色方块加小三角。

图片说明
想实现的悬停效果如上图所示。

自己写的代码如下面所示:
<!DOCTYPE html>



菜鸟教程(runoob.com) div{ border:2px solid white; height: 50px; border-radius:20px ; background:url(http://img4.imgtn.bdimg.com/it/u=2365445168,3406653750&fm=27&gp=0.jpg); } ul { list-style-type: none; margin: 0; padding: 0; overflow: hidden; border-radius:3px; } li { margin-top:9px; float: left; border-right: 1px solid white; height:35px; } li a { display: inline-block; color: white; text-align: center; padding: 14px 9px; line-height:3px; text-decoration: none; } li: hover{ background-color:rgba(255,255,255,0.5); transition-duration: 0s;} li a:hover { background-color:rgba(255,255,255,0.5); }



实际实现的悬停效果如下图所示:
图片说明

请问如何应该调整悬停的时候白色方块的高度,然后再在白色方块底下加一个小三角。求高人指点。

  • 写回答

4条回答 默认 最新

  • Tony_96 2017-10-28 04:57
    关注

    分成七个小块,每个悬停都是一个div,只显示左右两个边界,要在加一个小三角个人感觉要用js实现了

    评论

报告相同问题?

悬赏问题

  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 关于#python#的问题:自动化测试