search
HomeWeb Front-endJS TutorialCared Animated html css

Cared Animated html css

`




hj

@property --angle {
syntax: "";
initial-value: 0deg;
inherits: false;
}

@property --x {
syntax: "";
initial-value: 35%;
inherits: false;
}

@property --shine {
syntax: "";
initial-value: transparent;
inherits: false;
}

@property --shadow-strength {
syntax: "";
initial-value: 0%;
inherits: false;
}

:root {
--h: 240;
--s: 97%;
--l: 50%;
--surface-1: hsl(var(--h) var(--s) calc(var(--l) 4%));
--surface-2: hsl(var(--h) var(--s) calc(var(--l) 8%));
--surface-3: hsl(var(--h) var(--s) calc(var(--l) 12%));
--text: hsl(var(--h) var(--s) 96%);
--text-alt: hsl(var(--h) var(--s) 85%);
--shadow-color: var(--h) var(--s) 15%;
--shadow-strength: 1%;
--shadow: 0 -2px 5px 0 hsl(var(--shadow-color) /
calc(var(--shadow-strength) 2%)),
0 1px 1px -2px hsl(var(--shadow-color) / calc(var(--shadow-strength) 3%)),
0 2px 2px -2px hsl(var(--shadow-color) / calc(var(--shadow-strength) 3%)),
0 5px 5px -2px hsl(var(--shadow-color) / calc(var(--shadow-strength) 4%)),
0 9px 9px -2px hsl(var(--shadow-color) / calc(var(--shadow-strength) 5%)),
0 16px 16px -2px hsl(var(--shadow-color) / calc(var(--shadow-strength) 6%));
--space: 1rem;
}

  • { box-sizing: border-box; }

body {
color: var(--text);
background: var(--surface-1);
padding-inline: var(--space);
font-size: 1.125rem;
line-height: 1.4;
font-family: system-ui, sans-serif;
font-weight: 300;
}

main {
display: grid;
gap: 35vh;
}

.page-section {
container-type: inline-size;
display: grid;
gap: var(--space);
inline-size: min(var(--max, 30rem), 100%);
margin-inline: auto;
}

.page-footer {
margin-block-start: 50vh;
text-align: center;
padding: 2rem;

h2 {
display: grid;
}

h2::before {
content: "";
display: block;
width: 1px;
height: 3rem;
margin-block-end: 0.5rem;
margin-inline: auto;
background: var(--surface-3);
}
}

.icon {
width: 2.5rem;
height: auto;
}

.icon-sm {
width: 1.5rem;
color: var(--text-alt);
}

.text-label {
font-size: 0.8em;
font-weight: 500;
letter-spacing: 0.01em;
}

.author {
text-align: end;
}

.cluster {
display: flex;
align-items: center;
gap: 1rem;
}

.page-headline {
--_margin: 30vh;
margin-block-start: var(--_margin);
text-align: center;

&::after {
content: "";
display: block;
width: 1px;
height: var(--_margin);
margin-block-start: 0.8rem;
margin-inline: auto;
background: var(--surface-3);
}
}

box-gleam {
--_gleam: linear-gradient(
115deg,
transparent 40%,
var(--surface-3),
transparent 70%
)
var(--x) 0 / 600% 100% padding-box;
--_gleam-cover: radial-gradient(
circle at center,
var(--surface-1),
transparent
)
padding-box;
--_cover: linear-gradient(var(--surface-1), var(--surface-1)) padding-box;
--_shine: conic-gradient(
from var(--angle),
var(--shine),
transparent 20% 80%,
var(--shine)
)
border-box;
--_edges: linear-gradient(
155deg,
var(--surface-3),
var(--surface-2) 20% 80%,
var(--surface-3)
)
border-box;

display: grid;
gap: var(--space);
position: relative;
padding: 1.6rem;
border-radius: 0.8rem;
border: 1px solid transparent;
box-shadow: var(--shadow);
background: var(--_gleam-cover), var(--_gleam), var(--_cover), var(--_shine),
var(--_edges);
}

@supports (animation-timeline: view()) {
box-gleam {
animation: linear both;
animation-name: gleam, shine, shadow;
animation-timeline: view();
animation-range: cover -10% cover 100%, entry 0% cover 65%,
entry 0% exit 150%;
}
}

@media (prefers-reduced-motion: reduce) {
box-gleam {
animation: none !important;
}
}

@keyframes gleam {
from {
--angle: -1turn;
--x: 0%;
}
to {
--angle: 1turn;
--x: 100%;
}
}

@keyframes shadow {
from,
to {
box-shadow: none;
}
50%,
65% {
box-shadow: var(--shadow);
}
}

@keyframes shine {
0%,
45% {
--shine: transparent;
}
80% {
--shine: hsl(var(--h) var(--s) calc(var(--l) 38%));
}
}

bento-grid {
display: grid;
gap: var(--space);

  • { display: grid; place-items: center; place-content: center; text-align: center; padding: 2.5rem; } }

@container (inline-size > 35rem) {
bento-grid {
grid-template-columns: repeat(var(--col-count, 3), 1fr);
grid-template-rows: repeat(var(--row-count, 3), auto);






CSS view-timeline shine effect ⚠️ This browser does not support CSS animation-timeline


<box-gleam>
  <blockquote>
    <p>Fantasy is a necessary ingredient in living, it's a way of looking at life through the wrong end of a telescope.</p>
  </blockquote>
  <p class="author text-label">Dr. Seuss</p>
</box-gleam>

<box-gleam>
  <blockquote>
    <p>A day without sunshine is like, you know, night.</p>
  </blockquote>
  <p class="author text-label">Steve Martin</p>
</box-gleam>

<box-gleam>
  <blockquote>
    <p>I refuse to answer that question on the grounds that I don't know the answer</p>
  </blockquote>
  <p class="author text-label">Douglas Adams</p>
</box-gleam>

<box-gleam>
  <blockquote>
    <p>Whatever the problem, be part of the solution. Don’t just sit around raising questions and pointing out obstacles.</p>
  </blockquote>
  <p class="author text-label">Tina Fey</p>
</box-gleam>

<box-gleam>
  <blockquote>
    <p>Never memorize something that you can look up.</p>
  </blockquote>
  <p class="author text-label">Albert Einstein</p>
</box-gleam>

<box-gleam>
  <blockquote>
    <p>It’s no use going back to yesterday, because I was a different person then.</p>
  </blockquote>
  <p class="author text-label">Lewis Carroll</p>
</box-gleam>

Chart new territory


  <box-gleam>
    <svg class="icon" aria-hidden="true" width="15" height="15" viewbox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg">
      <path d="M12.3536 1.14645C12.1583 0.951184 11.8417 0.951184 11.6464 1.14645C11.4512 1.34171 11.4512 1.65829 11.6464 1.85355L12.7929 3H12C10.7037 3 9.71111 3.58423 8.87248 4.38931C8.20065 5.03427 7.59349 5.85684 6.99461 6.6682C6.86287 6.84668 6.73154 7.02462 6.6 7.2C5.10874 9.18835 3.49037 11 0.5 11C0.223858 11 0 11.2239 0 11.5C0 11.7761 0.223858 12 0.5 12C4.00963 12 5.89126 9.81165 7.4 7.8C7.54367 7.60845 7.6832 7.41962 7.81996 7.23454L7.82005 7.23443L7.82006 7.23441C8.41674 6.42695 8.96069 5.69085 9.56502 5.11069C10.2889 4.41577 11.0463 4 12 4H12.7929L11.6464 5.14645C11.4512 5.34171 11.4512 5.65829 11.6464 5.85355C11.8417 6.04882 12.1583 6.04882 12.3536 5.85355L14.3536 3.85355C14.5488 3.65829 14.5488 3.34171 14.3536 3.14645L12.3536 1.14645ZM0.5 3C3.35278 3 5.12992 4.44588 6.50548 6.06746L6.3762 6.24266C6.2483 6.4161 6.12293 6.58609 6 6.75C5.96397 6.79804 5.92798 6.84581 5.892 6.89331C4.57348 5.29306 3.02637 4 0.5 4C0.223858 4 0 3.77614 0 3.5C0 3.22386 0.223858 3 0.5 3ZM8.87248 10.6107C8.37284 10.131 7.90897 9.55314 7.45767 8.95468C7.64688 8.71693 7.82704 8.48061 8 8.25L8.08987 8.12987C8.58412 8.79402 9.05288 9.39766 9.56502 9.88931C10.2889 10.5842 11.0463 11 12 11H12.7929L11.6464 9.85355C11.4512 9.65829 11.4512 9.34171 11.6464 9.14645C11.8417 8.95118 12.1583 8.95118 12.3536 9.14645L14.3536 11.1464C14.5488 11.3417 14.5488 11.6583 14.3536 11.8536L12.3536 13.8536C12.1583 14.0488 11.8417 14.0488 11.6464 13.8536C11.4512 13.6583 11.4512 13.3417 11.6464 13.1464L12.7929 12H12C10.7037 12 9.71111 11.4158 8.87248 10.6107Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path>
    </svg>
    <h2 id="Shuffle-the-beat">Shuffle the beat</h2>
  </box-gleam>

  <box-gleam>





<h2 id="Thanks-for-the-scrolls">Thanks for the scrolls</h2>
<br><br>
  <br><br>
<br><br>
<br><br>
`


          </box-gleam>

The above is the detailed content of Cared Animated html css. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
JavaScript Comments: A Guide to Using // and /* */JavaScript Comments: A Guide to Using // and /* */May 13, 2025 pm 03:49 PM

JavaScriptusestwotypesofcomments:single-line(//)andmulti-line(//).1)Use//forquicknotesorsingle-lineexplanations.2)Use//forlongerexplanationsorcommentingoutblocksofcode.Commentsshouldexplainthe'why',notthe'what',andbeplacedabovetherelevantcodeforclari

Python vs. JavaScript: A Comparative Analysis for DevelopersPython vs. JavaScript: A Comparative Analysis for DevelopersMay 09, 2025 am 12:22 AM

The main difference between Python and JavaScript is the type system and application scenarios. 1. Python uses dynamic types, suitable for scientific computing and data analysis. 2. JavaScript adopts weak types and is widely used in front-end and full-stack development. The two have their own advantages in asynchronous programming and performance optimization, and should be decided according to project requirements when choosing.

Python vs. JavaScript: Choosing the Right Tool for the JobPython vs. JavaScript: Choosing the Right Tool for the JobMay 08, 2025 am 12:10 AM

Whether to choose Python or JavaScript depends on the project type: 1) Choose Python for data science and automation tasks; 2) Choose JavaScript for front-end and full-stack development. Python is favored for its powerful library in data processing and automation, while JavaScript is indispensable for its advantages in web interaction and full-stack development.

Python and JavaScript: Understanding the Strengths of EachPython and JavaScript: Understanding the Strengths of EachMay 06, 2025 am 12:15 AM

Python and JavaScript each have their own advantages, and the choice depends on project needs and personal preferences. 1. Python is easy to learn, with concise syntax, suitable for data science and back-end development, but has a slow execution speed. 2. JavaScript is everywhere in front-end development and has strong asynchronous programming capabilities. Node.js makes it suitable for full-stack development, but the syntax may be complex and error-prone.

JavaScript's Core: Is It Built on C or C  ?JavaScript's Core: Is It Built on C or C ?May 05, 2025 am 12:07 AM

JavaScriptisnotbuiltonCorC ;it'saninterpretedlanguagethatrunsonenginesoftenwritteninC .1)JavaScriptwasdesignedasalightweight,interpretedlanguageforwebbrowsers.2)EnginesevolvedfromsimpleinterpreterstoJITcompilers,typicallyinC ,improvingperformance.

JavaScript Applications: From Front-End to Back-EndJavaScript Applications: From Front-End to Back-EndMay 04, 2025 am 12:12 AM

JavaScript can be used for front-end and back-end development. The front-end enhances the user experience through DOM operations, and the back-end handles server tasks through Node.js. 1. Front-end example: Change the content of the web page text. 2. Backend example: Create a Node.js server.

Python vs. JavaScript: Which Language Should You Learn?Python vs. JavaScript: Which Language Should You Learn?May 03, 2025 am 12:10 AM

Choosing Python or JavaScript should be based on career development, learning curve and ecosystem: 1) Career development: Python is suitable for data science and back-end development, while JavaScript is suitable for front-end and full-stack development. 2) Learning curve: Python syntax is concise and suitable for beginners; JavaScript syntax is flexible. 3) Ecosystem: Python has rich scientific computing libraries, and JavaScript has a powerful front-end framework.

JavaScript Frameworks: Powering Modern Web DevelopmentJavaScript Frameworks: Powering Modern Web DevelopmentMay 02, 2025 am 12:04 AM

The power of the JavaScript framework lies in simplifying development, improving user experience and application performance. When choosing a framework, consider: 1. Project size and complexity, 2. Team experience, 3. Ecosystem and community support.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment