Rак сделать из диска более скруглунные и толстые диски как спагетти?

Ссылка скопирована
28 апреля 2026 1 ответ

Надо сделать эти линии(протоны электроны) вокруг ядря ввиде как бы не диска а ввиде спаггетти т.е круглыми а не ввиде диска у которого нет центра

:root {       --color: #7b48cd;       --animation-duration: 1600;     }      * {       margin: 0;       padding: 0;       box-sizing: border-box;     }      body {       height: 100vh;       display: flex;       justify-content: center;       align-items: center;       background: #000;     }      body::before {       width: 3vh;       height: 3vh;       background: var(--color);       border-radius: 50%;       box-shadow: 0 0 1vh 1px var(--color);       content: "";       position: absolute;       top: 50%;       left: 50%;       transform: translate(-50%, -50%);       transition: 0.75s;      }      svg {       width: 100%;       height: 75vh;     }      circle {       width: 100%;       height: 100%;       transform-style: preserve-3d;       fill: none;       stroke: var(--color);       stroke-width: 1;       stroke-dasharray: 310;       stroke-dashoffset: 310;       animation-timing-function: linear;       animation-iteration-count: infinite;       animation-duration: calc(var(--animation-duration) * 1ms);       transform-origin: center;       transition: 0.75s;     }      @keyframes drawCircle {       to {         stroke-dashoffset: -310;       }     }      circle:nth-child(1) {       transform: rotateX(80deg) rotateY(0deg) rotateZ(0deg);       animation-name: drawCircle, rotateCircle1;     }      @keyframes rotateCircle1 {       to {         transform: rotateX(80deg) rotateY(0deg) rotateZ(360deg);       }     }     circle:nth-child(2) {       transform: rotateX(75deg) rotateY(45deg) rotateZ(0deg);       animation-name: drawCircle, rotateCircle2;       animation-delay: 0.125s;     }     @keyframes rotateCircle2 {       to {         transform: rotateX(75deg) rotateY(45deg) rotateZ(360deg);       }     }     circle:nth-child(3) {       transform: rotateX(-75deg) rotateY(45deg) rotateZ(0deg);       animation-name: drawCircle, rotateCircle3;       animation-delay: 0.25s;     }     @keyframes rotateCircle3 {       to {         transform: rotateX(-75deg) rotateY(45deg) rotateZ(360deg);       }     }

:root { --color: #7b48cd; --animation-duration: 1600; } * { margin: 0; padding: 0; box-sizing: border-box; } body { height: 100vh; display: flex; justify-content: center; align-items: center; background: #000; } body::before { width: 3vh; height: 3vh; background: var(--color); border-radius: 50%; box-shadow: 0 0 1vh 1px var(--color); content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); transition: 0.75s; } svg { width: 100%; height: 75vh; } circle { width: 100%; height: 100%; transform-style: preserve-3d; fill: none; stroke: var(--color); stroke-width: 1; stroke-dasharray: 310; stroke-dashoffset: 310; animation-timing-function: linear; animation-iteration-count: infinite; animation-duration: calc(var(--animation-duration) * 1ms); transform-origin: center; transition: 0.75s; } @keyframes drawCircle { to { stroke-dashoffset: -310; } } circle:nth-child(1) { transform: rotateX(80deg) rotateY(0deg) rotateZ(0deg); animation-name: drawCircle, rotateCircle1; } @keyframes rotateCircle1 { to { transform: rotateX(80deg) rotateY(0deg) rotateZ(360deg); } } circle:nth-child(2) { transform: rotateX(75deg) rotateY(45deg) rotateZ(0deg); animation-name: drawCircle, rotateCircle2; animation-delay: 0.125s; } @keyframes rotateCircle2 { to { transform: rotateX(75deg) rotateY(45deg) rotateZ(360deg); } } circle:nth-child(3) { transform: rotateX(-75deg) rotateY(45deg) rotateZ(0deg); animation-name: drawCircle, rotateCircle3; animation-delay: 0.25s; } @keyframes rotateCircle3 { to { transform: rotateX(-75deg) rotateY(45deg) rotateZ(360deg); } }

<body>   <svg viewBox="0 0 100 100">     <circle cx="50" cy="50" r="49" />     <circle cx="50" cy="50" r="49" />     <circle cx="50" cy="50" r="49" />   </svg> </body>

<body> <svg viewBox="0 0 100 100"> <circle cx="50" cy="50" r="49" /> <circle cx="50" cy="50" r="49" /> <circle cx="50" cy="50" r="49" /> </svg> </body>

Дополнительно:

https://codepen.io

Нужно решить такую задачу?

Опишите проблему, и специалист поможет с настройкой, исправлением ошибки или доработкой сайта. Подберём понятный план работ без лишней переписки.

Заказать помощь
Лучший ответ
1
Анна SEO Ответ

Для того чтобы сделать из диска более скругленные и толстые диски, вы можете использовать библиотеку GD в PHP. Вот пример кода, который поможет вам достичь этой цели:

// Создаем изображение
$image = imagecreatefrompng('disk.png');
 
// Получаем ширину и высоту изображения
$width = imagesx($image);
$height = imagesy($image);
 
// Создаем новое изображение с более скругленными и толстыми дисками
$newImage = imagecreatetruecolor($width, $height);
 
// Задаем цвет фона
$bgColor = imagecolorallocate($newImage, 255, 255, 255);
imagefill($newImage, 0, 0, $bgColor);
 
// Копируем изображение с более скругленными и толстыми дисками
imagecopyresampled($newImage, $image, 0, 0, 0, 0, $width, $height, $width, $height);
 
// Выводим изображение
header('Content-Type: image/png');
imagepng($newImage);
 
// Освобождаем память
imagedestroy($image);
imagedestroy($newImage);

// Создаем изображение $image = imagecreatefrompng('disk.png'); // Получаем ширину и высоту изображения $width = imagesx($image); $height = imagesy($image); // Создаем новое изображение с более скругленными и толстыми дисками $newImage = imagecreatetruecolor($width, $height); // Задаем цвет фона $bgColor = imagecolorallocate($newImage, 255, 255, 255); imagefill($newImage, 0, 0, $bgColor); // Копируем изображение с более скругленными и толстыми дисками imagecopyresampled($newImage, $image, 0, 0, 0, 0, $width, $height, $width, $height); // Выводим изображение header('Content-Type: image/png'); imagepng($newImage); // Освобождаем память imagedestroy($image); imagedestroy($newImage);

В этом коде мы загружаем изображение с диском, создаем новое изображение с более скругленными и толстыми дисками, копируем исходное изображение на новое, устанавливаем цвет фона и выводим полученный результат. Не забудьте заменить 'disk.png' на путь к вашему изображению с диском.

Надеюсь, это поможет вам решить вашу проблему сделать диски более скругленными и толстыми как спагетти. Если у вас есть дополнительные вопросы, не стесняйтесь задавать.

Другие ответы (0)

Пока нет других ответов. Будьте первым, кто поможет автору.

Ответить на вопрос

комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Вам также может быть интересно