卷.html 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <!--
  2. * @Description:
  3. * @Autor: kindring
  4. * @Date: 2022-02-16 16:15:10
  5. * @LastEditors: kindring
  6. * @LastEditTime: 2022-02-16 17:00:53
  7. * @LastDescript:
  8. -->
  9. <!DOCTYPE html>
  10. <html lang="en">
  11. <head>
  12. <meta charset="UTF-8">
  13. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  14. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  15. <title>Document</title>
  16. </head>
  17. <body>
  18. <div class="div">
  19. <div class="t"></div>
  20. <div class="b"></div>
  21. </div>
  22. </body>
  23. <style>
  24. body {
  25. display: flex;
  26. height: 100vh;
  27. width: 100%;
  28. justify-content: center;
  29. align-items: center;
  30. background-color: rgb(53, 48, 48);
  31. }
  32. .div {
  33. width: 90%;
  34. height: 25%;
  35. position: relative;
  36. background-color: blueviolet;
  37. border: 3px solid white;
  38. border-radius: 5px;
  39. box-sizing: border-box;
  40. padding: 3px;
  41. }
  42. .div>.t,
  43. .div>.b {
  44. width: 30px;
  45. height: 30px;
  46. background-color: rgb(53, 48, 48);
  47. position: absolute;
  48. right: 30%;
  49. border: 3px solid white;
  50. border-radius: 50%;
  51. }
  52. .div>.t::before,
  53. .div>.b::before {
  54. display: block;
  55. content: '';
  56. width: 200%;
  57. height: 100%;
  58. padding: 3px;
  59. position: absolute;
  60. background-color: rgb(53, 48, 48);
  61. left: -5px;
  62. }
  63. .div>.t {
  64. top: 0;
  65. transform: translate(0, -60%);
  66. }
  67. .div>.b {
  68. bottom: 0;
  69. transform: translate(0, 60%);
  70. }
  71. .div>.t::before {
  72. top: -6px;
  73. transform: translate(0, -40%);
  74. }
  75. .div>.b::before {
  76. bottom: -6px;
  77. transform: translate(0, 40%);
  78. }
  79. </style>
  80. </html>