经验首页 前端设计 程序设计 Java相关 移动开发 数据库/运维 软件/图像 大数据/云计算 其他经验
当前位置:技术经验 » HTML/CSS » CSS3 » 查看文章
CSS3 分类菜单效果_css3_CSS
来源:jb51  时间:2019/5/28 8:56:39  对本文有异议

CSS3 分类菜单效果如下所述:

HTML

  1. <html>
  2. <head>
  3. <title></title>
  4. <style type="text/css">
  5. #bg { width: 1270px; height: 751px; margin: 0 auto; background: url("images/bg.jpg") no-repeat; }
  6. .sblock { width: 800px; height: 250px; margin: 0 auto;}
  7. /*.sblock { transform:translateY(65%); }*/
  8. .sblock > div { width: 200px; height: 250px; margin: 0 auto; }
  9. .sb1 { padding-top: 170px; }
  10. .sb2 { padding-top: 30px; }
  11. .sblock div:hover { transform: translateY(-10px); }
  12. .sblock div { transition:all 0.5s; }
  13. .sb1 > div:nth-of-type(1) { float: left; background: url("images/1.jpg") no-repeat; }
  14. .sb1 > div:nth-of-type(2) { float: left; background: url("images/2.jpg") no-repeat; }
  15. .sb1 > div:nth-of-type(3) { float: left; background: url("images/3.jpg") no-repeat; }
  16. .sb1 > div:nth-of-type(4) { float: left; background: url("images/4.jpg") no-repeat; }
  17. .sb2 > div:nth-of-type(1) { float: left; background: url("images/5.jpg") no-repeat; }
  18. .sb2 > div:nth-of-type(2) { float: left; background: url("images/6.jpg") no-repeat; }
  19. .sb2 > div:nth-of-type(3) { float: left; background: url("images/7.jpg") no-repeat; }
  20. .sb2 > div:nth-of-type(4) { float: left; background: url("images/8.jpg") no-repeat; }
  21. </style>
  22. </head>
  23. <body>
  24. <div id="bg">
  25. <section class="sblock sb1">
  26. <div></div>
  27. <div></div>
  28. <div></div>
  29. <div></div>
  30. </section>
  31. <section class="sblock sb2">
  32. <div></div>
  33. <div></div>
  34. <div></div>
  35. <div></div>
  36. </section>
  37. </div>
  38. </body>
  39. </html>

总结

以上所述是小编给大家介绍的CSS3 分类菜单效果,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对w3xue网站的支持!

 友情链接:直通硅谷  点职佳  北美留学生论坛

本站QQ群:前端 618073944 | Java 606181507 | Python 626812652 | C/C++ 612253063 | 微信 634508462 | 苹果 692586424 | C#/.net 182808419 | PHP 305140648 | 运维 608723728

W3xue 的所有内容仅供测试,对任何法律问题及风险不承担任何责任。通过使用本站内容随之而来的风险与本站无关。
关于我们  |  意见建议  |  捐助我们  |  报错有奖  |  广告合作、友情链接(目前9元/月)请联系QQ:27243702 沸活量
皖ICP备17017327号-2 皖公网安备34020702000426号