svg+css实现文本文字描边动画效果代码
代码语言:html
所属分类:动画
代码描述:svg+css实现文本文字描边动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Protest+Guerrilla&display=swap" rel="stylesheet"> <style> body { background-color: #000; } /* Basisstijl voor het SVG-element */ svg { position: absolute; top: 50%; left: 56%; transform: translate(-50%, -50%); width: 100%; height: auto; } /* Tekststijl: vul met patroon, en gebruik dikkere stroke */ text { fill: url(#imagePattern); font-family: "Protest Guerrilla", sans-serif; font-size: 150px; letter-spacing: 5px; stroke: rgb(130, 217, 252); stroke-width: 1px; stroke-dasharray: 500; stroke-dashoffset: 500; filter: url(#glowFilter); /* Voeg gloedfilter toe */ } </style> </head> <body translate="no"> <svg viewBox="0 0 800 200"> <!-- Definieer een patroon voor de tekst --> <defs> <pattern id="imagePattern" patternUnits="userSpaceOnUse" width="400" height="400"> <image href="//repo.bfw.wiki/bfwrepo/images/2aZNbEJ.png" x="0" y="0" width="400" height="400" /> </pattern> <!-- De.........完整代码请登录后点击上方下载按钮下载查看
网友评论0