0


前端必备精美CSS样式,不来瞅瞅吗?

写在前面:

我特别喜欢收集前端好看的特效代码,前端好用的网站。今天给大家分享出来,如果觉得有帮助可以点赞收藏支持一下,如果能关注一下就再好不过了ヾ(≧▽≦*)o,之后还会分享许多干货,话不多说,上动图(网站在文章末尾):

非新手可以跳过

考虑到看此文章的小伙伴有一些是新手。

有些小伙伴0基础小伙伴担心,我没有编程工具怎么办?

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

如果小伙伴想一起来学习前端知识,那么就从这篇文章开始吧

前端HTML:

http://t.csdn.cn/aQR2k

🍓按钮系列

HTML:

  1. <button class="custom-btn btn"><span>Button</span></button>

CSS:

  1. /* From www.lingdaima.com */
  2. .custom-btn {
  3. width: 130px;
  4. height: 40px;
  5. color: #fff;
  6. border-radius: 5px;
  7. padding: 10px 25px;
  8. font-family: 'Lato', sans-serif;
  9. font-weight: 500;
  10. background: transparent;
  11. cursor: pointer;
  12. transition: all 0.3s ease;
  13. position: relative;
  14. display: inline-block;
  15. box-shadow: inset 2px 2px 2px 0px rgba(255, 255, 255, .5),
  16. 7px 7px 20px 0px rgba(0, 0, 0, .1),
  17. 4px 4px 5px 0px rgba(0, 0, 0, .1);
  18. outline: none;
  19. }
  20. .btn {
  21. background: linear-gradient(0deg, rgba(255, 151, 0, 1) 0%, rgba(251, 75, 2, 1) 100%);
  22. line-height: 42px;
  23. padding: 0;
  24. border: none;
  25. }
  26. .btn span {
  27. position: relative;
  28. display: block;
  29. width: 100%;
  30. height: 100%;
  31. }
  32. .btn:before,
  33. .btn:after {
  34. position: absolute;
  35. content: "";
  36. right: 0;
  37. bottom: 0;
  38. background: rgba(251, 75, 2, 1);
  39. box-shadow: -7px -7px 20px 0px rgba(255, 255, 255, .9),
  40. -4px -4px 5px 0px rgba(255, 255, 255, .9),
  41. 7px 7px 20px 0px rgba(0, 0, 0, .2),
  42. 4px 4px 5px 0px rgba(0, 0, 0, .3);
  43. transition: all 0.3s ease;
  44. }
  45. .btn:before {
  46. height: 0%;
  47. width: 2px;
  48. }
  49. .btn:after {
  50. width: 0%;
  51. height: 2px;
  52. }
  53. .btn:hover {
  54. color: rgba(251, 75, 2, 1);
  55. background: transparent;
  56. }
  57. .btn:hover:before {
  58. height: 100%;
  59. }
  60. .btn:hover:after {
  61. width: 100%;
  62. }
  63. .btn span:before,
  64. .btn span:after {
  65. position: absolute;
  66. content: "";
  67. left: 0;
  68. top: 0;
  69. background: rgba(251, 75, 2, 1);
  70. box-shadow: -7px -7px 20px 0px rgba(255, 255, 255, .9),
  71. -4px -4px 5px 0px rgba(255, 255, 255, .9),
  72. 7px 7px 20px 0px rgba(0, 0, 0, .2),
  73. 4px 4px 5px 0px rgba(0, 0, 0, .3);
  74. transition: all 0.3s ease;
  75. }
  76. .btn span:before {
  77. width: 2px;
  78. height: 0%;
  79. }
  80. .btn span:after {
  81. height: 2px;
  82. width: 0%;
  83. }
  84. .btn span:hover:before {
  85. height: 100%;
  86. }
  87. .btn span:hover:after {
  88. width: 100%;
  89. }

** 更多按钮(文章最后有链接地址):**

🍇多选框系列

HTML:

  1. <label class="cont">
  2. <input checked="" type="checkbox">
  3. <span></span>
  4. </label>

CSS:

  1. /* From www.lingdaima.com */
  2. .cont {
  3. display: flex;
  4. align-items: center;
  5. transform: scale(1);
  6. }
  7. input[type="checkbox"] {
  8. height: 2rem;
  9. width: 2rem;
  10. margin: 5px;
  11. display: inline-block;
  12. appearance: none;
  13. position: relative;
  14. background-color: #F2ECFF;
  15. border-radius: 15%;
  16. cursor: pointer;
  17. overflow: hidden;
  18. }
  19. input[type="checkbox"]::after {
  20. content: '';
  21. display: block;
  22. height: 1rem;
  23. width: .5rem;
  24. border-bottom: .31rem solid #a0ffe7;
  25. border-right: .31rem solid #a0ffe7;
  26. opacity: 0;
  27. transform: rotate(45deg) translate(-50%, -50%);
  28. position: absolute;
  29. top: 50%;
  30. left: 20%;
  31. transition: .25s ease;
  32. }
  33. input[type="checkbox"]::before {
  34. content: '';
  35. display: block;
  36. height: 0;
  37. width: 0;
  38. background-color: #00C896;
  39. border-radius: 50%;
  40. opacity: .5;
  41. transform: translate(-50%, -50%);
  42. position: absolute;
  43. top: 50%;
  44. left: 50%;
  45. transition: .3s ease;
  46. }
  47. input[type="checkbox"]:checked::before {
  48. height: 130%;
  49. width: 130%;
  50. opacity: 100%;
  51. }
  52. input[type="checkbox"]:checked::after {
  53. opacity: 100%;
  54. }
  55. span {
  56. font-size: 2rem;
  57. }

🍈开关系列

HTML:

  1. <label class="switch">
  2. <input type="checkbox">
  3. <span class="slider"></span>
  4. </label>

CSS:

  1. /* From www.lingdaima.com */
  2. /* The switch - the box around the slider */
  3. .switch {
  4. /* --moon-mask: ; */
  5. font-size: 17px;
  6. position: relative;
  7. display: inline-block;
  8. width: 3.5em;
  9. height: 2em;
  10. }
  11. /* Hide default HTML checkbox */
  12. .switch input {
  13. opacity: 0;
  14. width: 0;
  15. height: 0;
  16. }
  17. /* The slider */
  18. .slider {
  19. position: absolute;
  20. cursor: pointer;
  21. top: 0;
  22. left: 0;
  23. right: 0;
  24. bottom: 0;
  25. background-color: #f4f4f5;
  26. transition: .4s;
  27. border-radius: 30px;
  28. }
  29. .slider:before {
  30. position: absolute;
  31. content: "";
  32. height: 1.4em;
  33. width: 1.4em;
  34. border-radius: 20px;
  35. left: 0.3em;
  36. bottom: 0.3em;
  37. background: linear-gradient(40deg,#ff0080,#ff8c00 70%);
  38. ;
  39. transition: .4s;
  40. }
  41. input:checked + .slider {
  42. background-color: #303136;
  43. }
  44. input:checked + .slider:before {
  45. transform: translateX(1.5em);
  46. background: #303136;
  47. box-shadow: inset -3px -2px 5px -2px #8983f7, inset -10px -5px 0 0 #a3dafb;
  48. }

🍅卡片系列

HTML:

  1. <div class="card">
  2. <div class="card2">
  3. </div>
  4. </div>

CSS:

  1. /* From www.lingdaima.com */
  2. .card {
  3. width: 190px;
  4. height: 254px;
  5. background-image: linear-gradient(163deg, #00ff75 0%, #3700ff 100%);
  6. border-radius: 20px;
  7. transition: all .3s;
  8. }
  9. .card2 {
  10. width: 190px;
  11. height: 254px;
  12. background-color: #1a1a1a;
  13. border-radius:;
  14. transition: all .2s;
  15. }
  16. .card2:hover {
  17. transform: scale(0.98);
  18. border-radius: 20px;
  19. }
  20. .card:hover {
  21. box-shadow: 0px 0px 30px 1px rgba(0, 255, 117, 0.30);
  22. }

以上精美样式来自:零代码 - 精美CSS样式库 (lingdaima.com)

标签: linq webview wpf

本文转载自: https://blog.csdn.net/m0_70571756/article/details/125091038
版权归原作者 新一代小卷王 所有, 如有侵权,请联系我们删除。

“前端必备精美CSS样式,不来瞅瞅吗?”的评论:

还没有评论