资讯详情

百款拿来就能用的网页特效,不来看看吗?

我特别喜欢收集前端好看的特效代码,前端好用的网站。今天和大家分享一下。如果你觉得有帮助,你可以,如果能再好不过了ヾ(≧▽≦*)o,之后会分享很多干货,话不多说,上动图:

??1.动态菜单

??2.龙卷风会动

??3.绕太阳转圈

??4.更多动态特效


考虑到一些看这篇文章的朋友是新手。

先来一个

前端是创建Web页面或app通过向用户展示前端界面的过程HTML,CSS及JavaScript以及互联网产品用户界面交互的技术、框架和解决方案。它从网页制作演变而来,具有明显的时代特征。在互联网的演变过程中,网页制作是Web1.在0时代的产品中,早期网站的主要内容是静态的,主要是图片和文本,用户使用网站的行为主要是浏览。随着互联网技术的发展和HTML5、CSS现代网页的应用更美观,交互效果显著,功能更强大。

可以参照这篇文章:http://t.csdn.cn/fB8yF

http://t.csdn.cn/aQR2k

??1.动态菜单

把这个菜单特效放在网站上不是很酷吗?来行动吧!

          
       
  1. <input class="menu-checkbox" id="menu" type="checkbox" name="menu" />
  2. <nav class="menu">
  3. <label class="menu-dots" for="menu">
  4. <span class="menu-dot"> </span>
  5. <span class="menu-dot"> </span>
  6. <span class="menu-dot"> </span>
  7. </label>
  8. <ul class="menu-items">
  9. <li class="menu-item">
  10. <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
  11. <path d="M9.25 8C9.25 9.24264 8.24264 10.25 7 10.25C5.75736 10.25 4.75 9.24264 4.75 8C4.75 6.75736 5.75736 5.75 7 5.75C8.24264 5.75 9.25 6.75736 9.25 8Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"> </path>
  12. <path d="M9.25 16C9.25 17.2426 8.24264 18.25 7 18.25C5.75736 18.25 4.75 17.2426 4.75 16C4.75 14.7574 5.75736 13.75 7 13.75C8.24264 13.75 9.25 14.7574 9.25 16Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"> </path>
  13. <path d="M9 15L19.25 6.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"> </path>
  14. <path d="M9 9L19.25 16.25" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"> </path>
  15. </svg>
  16. </li>
  17. <li class="menu-item">
  18. <svg width="24" height="24" fill="none" viewBox="0 0 24 24">
  19. <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M6.5 15.25V15.25C5.5335 15.25 4.75 14.4665 4.75 13.5V6.75C4.75 5.64543 5.64543 4.75 6.75 4.75H13.5C14.4665 4.75 15.25 5.5335 15.25 6.5V6.5"> </path>
  20. <rect width="10.5" height="10.5" x="8.75" y="8.75" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" rx="2"> </rect>
  21. </svg>
  22. </li>
  23. <li class="menu-item">
  24. <svg width="24" height="24" fill="none" viewBox="0 0 24 24">
  25. <path stroke="currentColor" stroke-width="1.5" d="M19.25 10C19.25 12.7289 17.85 15.25 16.5 15.25C15.15 15.25 13.75 12.7289 13.75 10C13.75 7.27106 15.15 4.75 16.5 4.75C17.85 4.75 19.25 7.27106 19.25 10Z"> </path>
  26. <path stroke="currentColor" stroke-width="1.5" d="M16.5 15.25C16.5 15.25 8 13.5 7 13.25C6 13 4.75 11.6893 4.75 10C4.75 8.31066 6 7 7 6.75C8 6.5 16.5 4.75 16.5 4.75"> </path>
  27. <path stroke="currentColor" stroke-width="1.5" d="M6.75 13.5V17.25C6.75 18.3546 7.64543 19.25 8.75 19.25H9.25C10.3546 19.25 11.25 18.3546 11.25 17.25V14.5"> </path>
  28. </svg>
  29. </li>
  30. <li class="menu-item">
  31. <svg width="24" height="24" fill="none" viewBox="0 0 24 24">
  32. <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M5.75 11.75C5.75 11.1977 6.19772 10.75 6.75 10.75H17.25C17.8023 10.75 18.25 11.1977 18.25 11.75V17.25C18.25 18.3546 17.3546 19.25 16.25 19.25H7.75C6.64543 19.25 5.75 18.3546 5.75 17.25V11.75Z"> </path>
  33. <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M7.75 10.5V9.84343C7.75 8.61493 7.70093 7.29883 8.42416 6.30578C8.99862 5.51699 10.0568 4.75 12 4.75C14 4.75 15.25 6.25 15.25 6.25"> </path>
  34. </svg>
  35. </li>
  36. <li class="menu-item">
  37. <svg width="24" height="24" fill="none" viewBox="0 0 24 24">
  38. <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M19.25 19.25L15.5 15.5M4.75 11C4.75 7.54822 7.54822 4.75 11 4.75C14.4518 4.75 17.25 7.54822 17.25 11C17.25 14.4518 14.4518 17.25 11 17.25C7.54822 17.25 4.75 14.4518 4.75 11Z"> </path>
  39. </svg>
  40. </li>
  41. <li class="menu-item">
  42. <svg width="24" height="24" fill="none" viewBox="0 0 24 24">
  43. <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M7.75 7.75H19.25L17.6128 14.7081C17.4002 15.6115 16.5941 16.25 15.666 16.25H11.5395C10.632 16.25 9.83827 15.639 9.60606 14.7618L7.75 7.75ZM7.75 7.75L7 4.75H4.75"> </path>
  44. <circle cx="10" cy="19" r="1" fill="currentColor"> </circle>
  45. <circle cx="17" cy="19" r="1" fill="currentColor"> </circle>
  46. </svg>
  47. </li>
  48. </ul>
  49. <label for="menu" class="menu-closer-overlay"> </label>
  50. </nav>


   
     
       
  1. body {
  2. height: 100vh;
  3. display: flex;
  4. flex-direction: column;
  5. align-items: center;
  6. justify-content: center;
  7. background: linear-gradient(to left, #2bc0e4, #eaecc6);
  8. }
  9. .menu-checkbox {
  10. display: none;
  11. }
  12. .menu {
  13. position: relative;
  14. }
  15. .menu-dots {
  16. width: 5rem;
  17. height: 5rem;
  18. border-radius: 50%;
  19. box-shadow: 0 0 0 0.3rem #161e3f;
  20. display: flex;
  21. flex-direction: column;
  22. align-items: center;
  23. justify-content: center;
  24. transform: rotate(90deg);
  25. transition: 0.3s;
  26. cursor: pointer;
  27. }
  28. .menu-dots:hover {
  29. box-shadow: 0 0 0 0.3rem #161e3f, 0 0 0 1rem rgba(#161e3f, 0.16);
  30. transform: scale(1.2) rotate(90deg);
  31. }
  32. .menu-dot {
  33. width: 0.45rem;
  34. height: 0.45rem;
  35. background-color: #161e3f;
  36. border-radius: 50%;
  37. }
  38. .menu-dot + .menu-dot {
  39. margin-top: 0.3rem;
  40. }
  41. .menu-items {
  42. position: absolute;
  43. top: -2.3rem;
  44. left: -2.2rem;
  45. width: 9.4rem;
  46. height: 11rem;
  47. color: #fff;
  48. pointer-events: none;
  49. display: grid;
  50. grid-template-columns: 1fr 1fr;
  51. opacity: 0;
  52. transition: 0.3s;
  53. }
  54. .menu-item {
  55. transform: scale(0.5);
  56. filter: blur(10px);
  57. transition: 0.3s;
  58. }
  59. .menu-item:nth-child(odd) {
  60. text-align: right;
  61. }
  62. .menu-item:nth-child(even) {
  63. text-align: left;
  64. }
  65. .menu-item:first-child,
  66. .menu-item:last-child {
  67. grid-column: span 2;
  68. text-align: center;
  69. }
  70. .menu-checkbox:checked + .menu > .menu-dots {
  71. transform: none;
  72. box-shadow: 0 0 0 3.4rem #161e3f;
  73. }
  74. .menu-checkbox:checked + .menu > .menu-items {
  75. opacity: 1;
  76. pointer-events: auto;
  77. }
  78. .menu-closer-overlay {
  79. position: absolute;
  80. left: 0;
  81. top: 0;
  82. width: 100%;
  83. height: 100%;
  84. background-color: transparent;
  85. border-radius: 50%;
  86. z-index: 2;
  87. pointer-events: none;
  88. }
  89. .menu-checkbox:checked + .menu > .menu-items > .menu-item {
  90. opacity: 1;
  91. transform: none;
  92. filter: none;
  93. }
  94. .menu-checkbox:checked + .menu > .menu-items > .menu-item:nth-child(1) {
  95. transition-delay: 0.05s;
  96. }
  97. .menu-checkbox:checked + .menu > .menu-items > .menu-item:nth-child(2) {
  98. transition-delay: 0.1s;
  99. }
  100. .menu-checkbox:checked + .menu > .menu-items > .menu-item:nth-child(3) {
  101. transition-delay: 0.15s;
  102. }
  103. .menu-checkbox:checked + .menu > .menu-items > .menu-item:nth-child(4) {