图像中的文字动画效果代码

来源:undefined 2025-01-10 20:05:04 1001

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

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

登录后复制

以上就是图像中的文字动画效果代码的详细内容,更多请关注php中文网其它相关文章!

最新文章