DEV Community

Prince
Prince

Posted on

1

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 class="text-container">
        <span class="letter">P</span><span class="letter">R</span>
        <span class="letter">I</span>
        <span class="letter">N</span><span class="letter">C</span><span class="letter">E</span>
    </div>

</body>
</html>
Enter fullscreen mode Exit fullscreen mode

SurveyJS custom survey software

Simplify data collection in your JS app with a fully integrated form management platform. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more. Integrates with any backend system, giving you full control over your data and no user limits.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay