css布局实现一个忍者神龟效果代码
代码语言:html
所属分类:布局界面
代码描述:css布局实现一个忍者神龟效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @charset "UTF-8"; @import url("https://fonts.googleapis.com/css?family=Bebas+Neue&display=swap"); * { box-sizing: border-box; line-height: 1; margin: 0; } main { align-items: center; background-image: radial-gradient(#abc19f 10%, #81ff00 100%); display: grid; justify-content: center; grid-auto-flow: column dense; height: 100vh; width: 100vw; } article { display: flex; height: 325px; width: 325px; position: relative; margin: auto; } article::before { content: ""; position: absolute; left: 0; right: 0; margin: auto; background-color: transparent; width: 0; height: 0; border-top: 320px transparent; border-right: 160px solid transparent; border-left: 160px solid transparent; z-index: 0; mix-blend-mode: soft-light; } article::after { content: ""; text-shadow: -2px 0 15px white; font-family: "Bebas Neue", cursive; font-size: 30px; display: flex; align-items: center; justify-content: center; position: absolute; left: 0; right: 0; top: 0px; margin: auto; width: 100%; height: 40px; } .turtle { position: relative; height: 190px; width: 100%; top: 20px; left: 0px; } .head, .eye { border-radius: 50%; } .head { box-shadow: inset 17px 1px 6px 0px rgba(30, 31, 38, 0.25); border: 3px solid #446b4f; background-color: #8db95d; height: 100px; left: 0; margin: auto; right: 0; top: 35px; width: 100px; position: relative; z-index: 3; } .head::after { box-shadow: inset -12px 1px 6px -4px rgba(166, 214, 140, 0.8); content: ""; position: absolute; top: 0; mix-blend-mode: screen; right: 0px; width.........完整代码请登录后点击上方下载按钮下载查看
网友评论0