Home >Web Front-end >JS Tutorial >Image in the Text animation effect code

Image in the Text animation effect code

Mary-Kate Olsen
Mary-Kate OlsenOriginal
2025-01-10 14:28:41329browse

Image in the Text animation effect code

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=
    , initial-scale=1.0">
    <title>Image Inside Text Effect</title>

    <style>
         @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap');


         body{
            margin: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
            overflow: hidden;
            /* background: url('./jerry.png') ; */
         }

         .text-container{
            display: flex;

         }

         .letter{
            font-family: 'Montserrat', sans-serif;
            font-size: 9rem;
            font-weight: bolder;
            color: transparent;
        background: url('./jerry.png') no-repeat center center;
    background-size: cover;
    --webkit-background-clip:text;
    background-clip: text;
line-height: 1;         }











    </style>
</head>
<body>
    <div>




          

            
        

The above is the detailed content of Image in the Text animation effect code. 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