纯css绘制一个蝴蝶效果代码
代码语言:html
所属分类:布局界面
代码描述:纯css绘制一个蝴蝶效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> html{ box-sizing: border-box ; --cream : #f2eee3 ; --black : #1b1b1b ; --red : #d91729 ; } html *, html *::before, html *::after { box-sizing: inherit ; } *::before, *::after{ content: "" ; position: absolute ; } body{ margin: 0 ; width: 100% ; height: 100vh ; display: flex ; overflow: hidden ; position: relative ; align-items: center ; justify-content: center ; background-color: var(--cream) ; } .butterfly{ width: 36em; height: 35em; position: relative; background-repeat: no-repeat ; background-image : radial-gradient(circle , var(--red) 46% , transparent 53.2%) , radial-gradient(circle , var(--black) 46% , transparent 53.2%) , radial-gradient(circle at center 0 , transparent 21.9%, var(--black) 22.1% , var(--black) 22.4% , transparent 22.7%) , radial-gradient(circle , var(--red) 30% , var(--black) 32% , var(--black) 51% , transparent 53.2%) , radial-gradient(circle , var(--red) 30% , var(--black) 32% , var(--black) 51% , transparent 53.2%) , radial-gradient(circle , var(--black) 51% , transparent 53.2%), radial-gradient(circle , var(--black) 51% , transparent 53.2%), radial-gradient(circle , var(--cream) 30% , var(--black) 32% , var(--black) 51% , transparent 53.2%) , radial-gradient(circle , var(--cream) 30% , var(--black) 32% , var(--black) 51% , transparent 53.2%) , radial-gradient(circle , var(--cream) 30% , var(--black) 32% , var(--black) 51% , transparent 53.2%) , radial-gradient(circle , var(--cream) 30% , var(--black) 32% , var(--black) 51% , transparent 53.2%) , radial-gradient(circle , var(--red) 30% , var(--black) 32% , var(--black) 51% , transparent 53.2%) , radial-gradient(circle , var(--red) 30% , var(--black) 32% , var(--black) 51% , transparent 53.2%) , radial-gradient(circle , var(--red) 30% , var(--black) 32% , var(--black) 51% , transparent 53.2%) , radial-gradient(circle , var(--red) 30% , var(--black) 32% , var(--black) 51% , transparent 53.2%) , radial-gradient(circle , var(--black) 51% , transparent 53.2%) , radial-gradient(circle , var(--black) 51% , transparent 53.2%) , radial-gradient(circle , var(--black) 51% , transparent 53.2%) , radial-gradient(circle , var(--black) 51% , transparent 53.2%) , radial-gradient(circle at center 0 , var(--cream) 51% , transparent 53.2%) , radial-gradient(circle at center 100% , var(--cream) 51% , transparent 53.2%) , radial-gradient(circle at center 0 , var(--cream) 51% , transparent 53.2%) , radial-gradient(circle at center 100% , var(--cream) 51% , transparent 53.2%) , radial-gradient(circle at center 0 , var(--cream) 51% , transparent 53.2%) , radial-gradient(circle at center 100% , var(--cream) 51% , transparent 53.2%) , radial-gradient(circle at center 0 , var(--cream) 51% , transparent 53.2%) , radial-gradient(circle at center 100% , var(--cream) 51% , transparent 53.2%) , radial-gradient(circle at center 0 , var(--cream) 51% , transparent 53.2%) , radial-gradient(circle at center 100% , var(--cream) 51% , transparent 53.2%) , radial-gradient(circle at center 0 , var(--cream) 51% , transparent 53.2%) , radial-gradient(circle at center 100% , var(--cream) 51% , transparent 53.2%) , radial-gradient(circle at center 0 , var(--cream) 51% , transparent 53.2%) , radial-gradient(circle at center 100% , var(--cream) 51% , transparent 53.2%) , radial-gradient(circle at center 0 , var(--cream) 51% , transparent 53.2%) , radial-gradient(circle at center 100% , var(--cream) 51% , transparent 53.2%) , linear-gradient( var(--black) 100% , transparent 0%) , linear-gradient( var(--black) 100% , transparent 0%) , radial-gradient(circle , var(--black) 46% , transparent 53.2%) , linear-gradient( var(--black) 100% , transparent 0%) ; background-size : 1em 1em , 1em 1em , 17.7em 17.3em , 3em 3em , 3em 3em , 3em 3em , 3em 3em , 3em 3em , 3em 3em , 3em 3em , 3em 3em , 3em 3em , 3em 3em , 3em 3em , 3em 3em , 3em 3em , 3em 3em , 3em 3em , 3em 3em , 2.9em 1.9em , 2.9em 1.9em , 2.9em 1.9em , 2.9em 1.9em , 2.9em 1.9em , 2.9em 1.9em , 2.9em 1.9em , 2.9em 1.9em , 2.9em 1.9em , 2.9em 1.9em , 2.9em 1.9em , 2.9em 1.9em , 2.9em 1.9em , 2.9em 1.9em , 2.9em 1.9em , 2.9em 1.9em , 2.3em .9em , 2.9em .9em , 1em 1em , 0.1em 2.1em ; background-position : 13.12em 5em , 21.62em 5em , 9.02em 5.4em , 15.12em 9.5em , 17.52em 9.5em , 15.12em 11.9em , 17.52em 11.9em , 15.12em 14.2em , 17.52em 14.2em , 15.12em 16.6em , 17.52em 16.6em , 15.12em 19em , 17.52em 19em , 15.12em 21.4em , 17.52em 21.4em , 15.12em 23.8em , 17.52em 23.8em , 15.12em 26.1em , 17.52em 26.1em , 15.2em 11.05em , 17.55em 9em , 15.2em 13.4em , 17.55em 11.5em , 15.2em 15.75em , 17.55em 13.8em , 15.2em 18.2em , 17.55em 16.2em , 15.2em 20.55em , 17.55em 18.6em , 15.2em 22.95em , 17.55em 20.95em , .........完整代码请登录后点击上方下载按钮下载查看
网友评论0