单个div+css实现立方体渐变文字效果代码

代码语言:html

所属分类:布局界面

代码描述:单个div+css实现立方体渐变文字效果代码

代码标签: 单个 div css 立方体 渐变 文字

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">



    <style>
        body {
          min-height: 200px;
          height: 100vh;
          position: relative;
          background-color: #0ff;
        }
        #cubed {
          position: absolute;
          left: 50%;
          top: 50%;
          width: 20em;
          height: 7em;
          margin-left: -9em;
          margin-top: -1.5em;
          background: linear-gradient(#f0f, #f0f) 2em 1em /2em 1em, linear-gradient(#f0f 1em, #ffc0cb 3em) 1em 2em/1em 4em, linear-gradient(#f0f, #f0f) 4em 2em/1em 1em, linear-gradient(#ffc0cb, #ffc0cb) 4em 5em/1em 1em, linear-gradient(#ffc0cb, #ffc0cb) 2em 6em /2em 1em, linear-gradient(45deg, rgba(0,0,255,0) 0.7em, #00f 0.7em, #00f 2.12em, rgba(0,0,255,0) 2.12em) 1em 0 /3em 1em, linear-gradient(45deg, rgba(0,0,255,0) 0.7em, #00f 0.7em, #00f 1.4em, rgba(0,0,255,0) 1.4em) 0 1em /2em 1em, linear-gradient(45deg, #00f 0.7em, rgba(0,0,255,0) 0.7em) 4em 1em/1em 1em, linear-gradient(45deg, rgba(0,0,255,0) 0.7em, #00f 0.7em, #00f 2.12em, rgba(0,0,255,0) 2.12em) 1em 5em /3em 1em, linear-gradient(45deg, rgba(0,0,255,0) 0.7em, #00f 0.7em, #00f 1.4em, rgba(0,0,255,0) 1.4em) 3em 4em /2em 1em, linear-gradient(45deg, rgba(0,0,128,0) 0.7em, #000080 0.7em, #000080 3.7em, rgba(0,0,128,0) 3.7em) 0 1em/1em 5em, linear-gradient(#000080, #000080) 1em 0/1em 2em, linear-gradient(45deg, rgba(0,0,128,0) 0.7em, #000080 0.7em, #000080 3.7em, rgba(0,0,128,0) 3.7em) 1em 6em/1em 1em, linear-gradient(#000080, #000080) 3em 4em/1em 2em, linear-gradient(#f0f 2em, #ffc0cb 4em) 6em 1em/1em 5em, linear-gradient(#ffc0cb, #ffc0cb) 7em 6em /2em 1em, linear-gradient(#f0f 2em, #ffc0cb 4em) 9em 1em/1em 5em, linear-gradient(45deg, rgba(0,0,255,0) 0.7em, #00f 0.7em, #00f 1.4em, rgba(0,0,255,0) 1.4em) 5em 0 /2em 1em, linear-gradient(45deg, rgba(0,0,255,0) 0.7em, #00f 0.7em, #00f 1.4em, rgba(0,0,255,0) 1.4em) 8em 0 /2em 1em, linear-gradient(45deg, rgba(0,0,255,0) 0.7em, #00f 0.7em, #00f 2.12em, rgba(0,0,255,0) 2.12em) 6em 5em /3em 1em, linear-gradient(45deg, rgba(0,0,128,0) 0.7em, #0000.........完整代码请登录后点击上方下载按钮下载查看

网友评论0