Advertisement
EliseyD

CSS для задания с фруктами

Nov 26th, 2024
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.94 KB | None | 0 0
  1. body {
  2.     font-family: Arial, sans-serif;
  3.     background-color: white;
  4.     margin: 0;
  5.     padding: 0;
  6.     display: flex;
  7.     justify-content: center;
  8.     align-items: center;
  9.     height: 100vh;
  10. }
  11.  
  12. .container {
  13.     background-color: #f2a2a2;
  14.     padding: 20px;
  15.     width: 700px;
  16.  
  17. }
  18.  
  19. .fruit-list {
  20.    
  21.     list-style: none;
  22.     padding: 0;
  23.     margin: 10px;
  24. }
  25.  
  26. .fruit-list li {
  27.     background-color: #e06666;
  28.     margin: 10px 0;
  29.     padding: 10px 15px;
  30.     position: relative;
  31.     overflow: hidden;
  32. }
  33.  
  34. .fruit-list li span {
  35.     display: right;
  36.     background-color: #a50000;
  37.     color: white;
  38.     padding: 10px;
  39.  
  40.  
  41. }
  42.  
  43.    
  44.  
  45. .fruit-list li::before {
  46.     content: attr(value);
  47.     background-color: #d9d2e9;
  48.     color: #a61c00;
  49.     font-weight: bold;
  50.     font-size: 14px;
  51.     position: absolute;
  52.     top: 50%;
  53.     left: 10px;
  54.     padding: 0 20px;
  55. }
  56.  
  57. .number{
  58.     color: white;
  59.     padding: 10px;
  60. }
  61.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement