<!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!