hello.css 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. #base {
  2. position: relative;
  3. }
  4. @keyframes shaking {
  5. from {
  6. transform: rotate(0deg);
  7. }
  8. 20% {
  9. transform: rotate(-3deg);
  10. }
  11. 40% {
  12. transform: rotate(0deg);
  13. }
  14. 60% {
  15. transform: rotate(3deg);
  16. }
  17. 80% {
  18. transform: rotate(0deg);
  19. }
  20. to {
  21. transform: rotate(0deg);
  22. }
  23. }
  24. #title-1 {
  25. text-decoration: none;
  26. border-bottom: black solid 3px;
  27. padding-bottom: 15px;
  28. width: 96%;
  29. margin: auto;
  30. font-weight: bold;
  31. text-align: center;
  32. color: black;
  33. font-size: 50px;
  34. padding-top: 5%;
  35. }
  36. #title-1:hover {
  37. animation: shaking 300ms linear 0s 1;
  38. }
  39. #btn {
  40. position: relative;
  41. display: block;
  42. text-align: center;
  43. border-radius: 10px;
  44. border-width: 3px;
  45. border-style: ridge;
  46. border-color: rgb(123, 104, 238);
  47. background-image: linear-gradient(to right, #F0FFF0 0%, #FFDC00 30%, #FFDC00 100%);
  48. font-size: 30px;
  49. height: 100px;
  50. box-shadow: 5px 5px 2px 0 black;
  51. }
  52. @media all and (max-width: 992px) {
  53. #btn {
  54. top: 120px;
  55. left: 3%;
  56. width: 94%;
  57. }
  58. }
  59. @media not all and (max-width: 992px) {
  60. #btn {
  61. top: 120px;
  62. left: 25%;
  63. width: 50%;
  64. transition:
  65. transform 1s,
  66. background-image 1s;
  67. }
  68. #btn:hover {
  69. background-image: linear-gradient(to right, #F0FFF0 0%, #F0FFF0 70%, #FFDC00 100%);
  70. transform: scale(1.5);
  71. }
  72. }
  73. #main {
  74. text-align: center;
  75. }
  76. #title-section {
  77. height: 50vh;
  78. width: 50%;
  79. margin: 10% auto;
  80. background-color: rgb(255, 255, 255, 20%);
  81. border-radius: 10px;
  82. }