当前位置:   article > 正文

八种button的hover效果_button hover

button hover

 CSS八种hover效果,快用起来_哔哩哔哩_bilibili

以下由于引入了transition所以还需要加兼容性处理:

-ms-        :/* IE 9 */

-webkit-        :/* Safari 和 Chrome */

-moz-        :/* Firefox */

-o-        :/* Opera */

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>Document</title>
  8. <style>
  9. .btn1{
  10. width: 100px;
  11. height: 40px;
  12. color: #fff;
  13. font-size: 20px;
  14. position: relative;
  15. background-color: skyblue;
  16. border: skyblue;
  17. border-radius: 5px;
  18. text-align: right;
  19. padding-right: 20px;
  20. }
  21. .btn1:hover img{
  22. animation: fly 2s ease 1;
  23. }
  24. @keyframes fly {
  25. 0%{
  26. transform: translateX(0);
  27. }
  28. 50%{
  29. transform: translateX(100px);
  30. }
  31. 100%{
  32. transform: translateX(0);
  33. }
  34. }
  35. .btn1 img{
  36. width: 20px;
  37. position: absolute;
  38. top: 10px;
  39. left: 10px;
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/302552
推荐阅读
相关标签
  

闽ICP备14008679号