svg+css实现文字突出挤出效果代码
代码语言:html
所属分类:布局界面
代码描述:svg+css实现文字突出挤出效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @import url("https://fonts.googleapis.com/css2?family=Paytone+One&display=swap"); :root { --purple: #6a67ce; --pink: #fc636b; --green: #3be8b0; --blue: #1aafd0; --yellow: #ffb900; --offwhite: #f8efe9; } body { min-height: 100vh; display: flex; align-items: center; justify-content: center; background-color: var(--green); text-align: center; } h1 { display: block; font-family: "Paytone One", sans-serif; font-size: 10vw; color: var(--blue); filter: url(#extrude); } svg { position: absolute; left: -10000px; height: 0; width: 0; } </style> </head> <body > <h1>BFW.WIKI</h1> <svg> <defs> <!-- make sure the filter convers the whole viewBox by makin it LORGE --> <filter id="extrude" x="-100%" y="-100%" width="300%" height="300%"> <!-- flood with a nice purple color --> <feFlood result="PURPLE" flood-color=".........完整代码请登录后点击上方下载按钮下载查看
网友评论0