/
android113
/
react_todo
Обзор
Документация
Войти
/
android113
/
react_todo
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
dev
src/App.css
330 строк
8 KB
Скороходов Андрей Андреевич
updated bgImage
09 дек 2025, 13:39
09 дек 2025, 13:39
e2dc6bd
Код
Авторство
О чём код?
/* ОБНУЛЕНИЕ ВСТРОЕННЫХ СТИЛЕЙ БРАУЗЕРА */ * { box-sizing: border-box; } body { margin: 0; padding: 0; } /* === ГЛАВНЫЙ КОНТЕЙНЕР === position: relative нужен, чтобы внутри него "абсолютные" картинки располагались друг над другом правильно. */ .app-container { position: relative; display: flex; justify-content: center; align-items: flex-start; /* Карточку ставим ближе к верху */ min-height: 100vh; padding: 80px 20px; font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; overflow: hidden; } /* СЛОЙ 1: Статичная красивая картинка (Твоя ссылка) */ .bg-image { position: fixed; top: 0; left: 0; width: 100%; height: 100%; /* ТВОЯ ССЫЛКА НА ИЗОБРАЖЕНИЕ С УБРАННЫМИ ЛИШНИМИ SIMVOLAMI */ background: url('https://i.pinimg.com/originals/8d/89/59/8d89595920b3e327cd7e9b596545b8f3.jpg') no-repeat center center fixed; background-size: cover; /* Картинка растянется, чтобы заполнить экран */ z-index: -3; /* Самый нижний слой */ } /* СЛОЙ 2: Анимация тумана */ .fog-container { position: absolute; width: 100%; height: 100%; top: 0; left: 0; overflow: hidden; z-index: -2; /* Слой над картинкой */ opacity: 0.7; /* Яркость тумана */ pointer-events: none; /* Прозрачен для кликов */ } /* Сама текстура тумана */ .fog-img { position: absolute; height: 100vh; width: 300vw; /* Текстура облаков */ background: url('https://raw.githubusercontent.com/danielstuart14/CSS_FOG_ANIMATION/master/fog1.png') repeat-x; background-size: contain; } .fog-img-first { background-position: center; animation: fog 60s linear infinite; /* Едем медленно */ } .fog-img-second { background-position: center; top: 30px; animation: fog 40s linear infinite reverse; /* Едем быстрее назад для объема */ opacity: 0.5; } @keyframes fog { 0% { transform: translate3d(0, 0, 0); } 100% { transform: translate3d(-200vw, 0, 0); } } /* === СТЕКЛЯННАЯ КАРТОЧКА === */ .card { /* Полупрозрачный белый, немного прозрачнее, чем был (0.6), чтобы было лучше видно фон */ background: rgba(255, 255, 255, 0.65); /* Размытие фона под карточкой (Glassmorphism) */ backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); /* Светлая обводка по контуру */ border: 1px solid rgba(255, 255, 255, 0.5); width: 100%; max-width: 600px; border-radius: 24px; /* Сильная тень для отрыва от фона */ box-shadow: 0 20px 60px rgba(0,0,0,0.4); padding: 30px; display: flex; flex-direction: column; } .header { color: #1a0f2e; /* Темно-фиолетовый шрифт, под тон картинки */ margin-bottom: 25px; text-align: center; font-size: 2.2rem; font-weight: 800; } /* --- КОНТРОЛЫ И КНОПКИ --- */ .controls-area { min-height: 60px; margin-bottom: 25px; } .input-group, .new-cat-group { display: flex; gap: 10px; } /* Анимация появления поля создания группы */ .fade-in { animation: fadeIn 0.3s ease; } @keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } input, select, .action-btn { height: 48px; border-radius: 14px; font-size: 1rem; outline: none; transition: all 0.2s; border: none; box-shadow: 0 4px 6px rgba(0,0,0,0.05); } /* Поле ввода - делаем поплотнее, чтоб текст читался */ input { flex-grow: 1; padding: 0 16px; background: rgba(255, 255, 255, 0.95); border: 2px solid transparent; } input:focus, select:focus { background: #fff; border-color: #6c5ce7; box-shadow: 0 0 15px rgba(108, 92, 231, 0.4); } .category-select { width: 35%; padding: 0 10px; background: rgba(255, 255, 255, 0.9); cursor: pointer; font-weight: 700; color: #444; } .emoji-select { font-size: 1.5rem; width: 70px; text-align: center; background: #dfe6e9; padding: 0; } .action-btn { cursor: pointer; color: white; min-width: 48px; font-size: 1.4rem; display: flex; justify-content: center; align-items: center; } /* Главная кнопка (+) */ .main-btn { background: linear-gradient(135deg, #6c5ce7, #a29bfe); } .main-btn:hover { transform: scale(1.05); } .success-btn { background: #00b894; } .cancel-btn { background: #fab1a0; color: #fff;} /* === ГРУППЫ СПИСКОВ === */ .category-group { margin-bottom: 20px; /* Стекло внутри стекла (более светлое) */ background: rgba(255, 255, 255, 0.45); border-radius: 16px; border: 1px solid rgba(255,255,255, 0.6); padding: 6px; transition: transform 0.2s; } .category-group:hover { background: rgba(255, 255, 255, 0.6); } .category-header { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 8px 15px; } .cat-emoji { font-size: 1.4rem; margin-right: 12px;} .cat-name { font-size: 0.9rem; text-transform: uppercase; color: #2d3436; font-weight: 800; } .cat-count-badge { background: #fff; color: #2d3436; font-size: 0.75rem; padding: 3px 8px; margin-left: 8px; border-radius: 6px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); } .cat-controls { display: flex; gap: 8px; align-items: center; } /* Кнопка сворачивания */ .collapse-btn { width: 30px; height: 30px; background: rgba(255, 255, 255, 0.8); border-radius: 8px; border: none; color: #636e72; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s; font-size: 0.8rem; } .collapse-btn.collapsed { transform: rotate(-90deg); background: #74b9ff; color: white; } .collapse-btn:hover { background: #fff; } /* Удаление группы */ .delete-cat-btn { background: none; border: none; color: #e17055; cursor: pointer; font-size: 1.1rem; opacity: 0.5; } .delete-cat-btn:hover { opacity: 1; transform: scale(1.1); } /* Элементы внутри списка */ .todo-list { list-style: none; padding: 4px; margin: 0; } .slide-down { animation: slideIn 0.3s ease; } @keyframes slideIn { from{opacity:0; transform:translateY(-10px);} to{opacity:1;} } .todo-item { background: #fff; border-radius: 12px; padding: 12px 14px; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; border: 1px solid transparent; } .todo-item:hover { transform: translateX(3px); box-shadow: 2px 4px 8px rgba(0,0,0,0.05); } .todo-text { display: flex; align-items: center; cursor: pointer; flex-grow: 1; font-size: 1rem; color: #2d3436; } .check-circle { min-width: 20px; height: 20px; border: 2px solid #b2bec3; border-radius: 50%; margin-right: 12px; } /* Состояние ВЫПОЛНЕНО */ .todo-item.completed { background: rgba(255,255,255,0.6); box-shadow: none; } .todo-item.completed .check-circle { background-color: #00b894; border-color: #00b894; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E"); background-size: 70%; background-position: center; background-repeat: no-repeat; } .todo-item.completed .todo-text { text-decoration: line-through; color: #a4b0be; } /* Кнопка удаления задачи */ .delete-todo-btn { background: transparent; border: none; color: #dfe6e9; font-size: 1.2rem; cursor: pointer; } .todo-item:hover .delete-todo-btn { color: #d63031; } .empty-state, .footer, .empty-cat-placeholder { color: #636e72; opacity: 0.8; text-align: center; } .footer { border-top: 1px solid rgba(0,0,0,0.1); margin-top: auto; padding-top: 15px; font-size: 0.8rem; }