Skip to content

Commit 332f834

Browse files
committed
Add missing css
1 parent c45b7bc commit 332f834

1 file changed

Lines changed: 95 additions & 0 deletions

File tree

  • macroquad-introduction-book-english

macroquad-introduction-book-english/book.css

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,3 +376,98 @@ strong {
376376
}
377377
}
378378

379+
380+
/* Card */
381+
382+
.card {
383+
--white: hsl(0, 0%, 100%);
384+
--black: hsl(240, 15%, 9%);
385+
--paragraph: hsl(0, 0%, 83%);
386+
--line: hsl(240, 9%, 17%);
387+
--primary: hsl(266, 92%, 58%);
388+
389+
position: relative;
390+
391+
display: flex;
392+
flex-direction: column;
393+
gap: 1rem;
394+
395+
padding: 4rem;
396+
background-color: hsla(240, 15%, 9%, 1);
397+
background-image: radial-gradient(
398+
at 88% 40%,
399+
hsla(240, 15%, 9%, 1) 0px,
400+
transparent 85%
401+
),
402+
radial-gradient(at 49% 30%, hsla(240, 15%, 9%, 1) 0px, transparent 85%),
403+
radial-gradient(at 14% 26%, hsla(240, 15%, 9%, 1) 0px, transparent 85%),
404+
radial-gradient(at 0% 64%, hsla(263, 93%, 56%, 1) 0px, transparent 85%),
405+
radial-gradient(at 41% 94%, hsla(284, 100%, 84%, 1) 0px, transparent 85%),
406+
radial-gradient(at 100% 99%, hsla(306, 100%, 57%, 1) 0px, transparent 85%);
407+
408+
border-radius: 1rem;
409+
box-shadow: 0px -16px 24px 0px rgba(255, 255, 255, 0.25) inset;
410+
}
411+
412+
.card .card__border {
413+
overflow: hidden;
414+
pointer-events: none;
415+
416+
position: absolute;
417+
z-index: -10;
418+
top: 50%;
419+
left: 50%;
420+
transform: translate(-50%, -50%);
421+
422+
width: calc(100% + 2px);
423+
height: calc(100% + 2px);
424+
background-image: linear-gradient(
425+
0deg,
426+
hsl(0, 0%, 100%) -50%,
427+
hsl(0, 0%, 40%) 100%
428+
);
429+
430+
border-radius: 1rem;
431+
}
432+
433+
.card .card__border::before {
434+
content: "";
435+
pointer-events: none;
436+
437+
position: fixed;
438+
z-index: 200;
439+
top: 50%;
440+
left: 50%;
441+
transform: translate(-50%, -50%), rotate(0deg);
442+
transform-origin: left;
443+
444+
width: 200%;
445+
height: 10rem;
446+
background-image: linear-gradient(
447+
0deg,
448+
hsla(0, 0%, 100%, 0) 0%,
449+
hsl(277, 95%, 60%) 40%,
450+
hsl(277, 95%, 60%) 60%,
451+
hsla(0, 0%, 40%, 0) 100%
452+
);
453+
454+
animation: rotate 8s linear infinite;
455+
}
456+
457+
@keyframes rotate {
458+
to {
459+
transform: rotate(360deg);
460+
}
461+
}
462+
463+
.card .card_title__container .card_title {
464+
font-size: 4rem;
465+
color: var(--white);
466+
}
467+
468+
.card .card_title__container .card_paragraph {
469+
margin-top: 0.25rem;
470+
471+
font-size: 2rem;
472+
color: var(--paragraph);
473+
}

0 commit comments

Comments
 (0)