js+css实现文字阴影立体排版代码

代码语言:html

所属分类:布局界面

代码描述:js+css实现文字阴影立体排版代码,可修改参数

代码标签: js css 文字 阴影 立体 排版 代码

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

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  



  
  
  
<style>
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

body {
    background-color: #fff;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    font-family: 'Arial Black', 'Arial Bold', Gadget, sans-serif
}

.stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center
}

.container {
    text-align: right;
    font-size: 11rem;
    line-height: .82;
    font-weight: 900;
    letter-spacing: -2px;
    color: #fff;
    text-transform: uppercase;
    transition: filter 0.15s ease, font-size 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-end
}

.line-1 {
    padding-right: 4px
}

.line-2 {
    padding-right: 4px
}

.line-1:empty,
.line-2:empty {
    display: none
}

.popup-menu {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgb(20 20 20 / .85);
    backdrop-filter: blur(6px);
    border-radius: 60px;
    padding: .6rem 1.2rem;
    display: flex;
    gap: .3rem;
    box-shadow: 0 8px 24px rgb(0 0 0 / .25);
    border: 1px solid rgb(255 255 255 / .08);
    z-index: 999;
    user-select: none;
    font-family: 'Arial Black', 'Arial Bold', sans-serif;
    letter-spacing: .3px
}

.popup-menu button {
    background: #fff0;
    border: none;
    color: #ccc;
    font-size: .8rem;
    font-weight: 700;
    padding: .4rem 1rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-family: inherit;
    width: 40px;
    height: 40px
}

.popup-menu button:hover {
    background: rgb(255 255 255 / .08);
    color: #fff
}

.popup-menu button.active {
    background: #000;
    color: #fff;
    box-shadow: 0 2px 8px rgb(0 0 0 / .3)
}

.popup-menu button span {
    position: relative;
    left: -2px
}

.text-panel-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    background: rgb(20 20 20 / .8);
    backdrop-filter: blur(6px);
    border: 1px solid rgb(255 255 255 / .1);
    border-radius: 40px;
    color: #eee;
    font-size: 1.1rem;
    padding: .5rem 1.2rem;
    cursor: pointer;
    z-index: 1000;
    font-family: 'Arial Black', 'Arial Bold', sans-serif;
    letter-spacing: .5px;
    transition: 0.2s;
    box-shadow: 0 4px 12px rgb(0 0 0 / .2);
    user-select: none
}

.text-panel-toggle:hover {
    background: rgb(40 40 40 / .9);
    color: #fff
}

.text-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 370px;
    max-width: 94vw;
    height: 100vh;
    background: rgb(15 15 15 / .94);
    backdrop-filter: blur(14px);
    border-left: 1px solid rgb(255 255 255 / .08);
    padding: 2rem 1.5rem;
    z-index: 1001;
    transform: translateX(110%);
    transition: transform 0.35s cubic-bezier(.22, 1, .36, 1);
    box-shadow: -8px 0 30px rgb(0 0 0 / .5);
    font-family: 'Arial Black', 'Arial Bold', sans-serif;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: #eee;
    overflow-y: auto
}

.text-panel.open {
    transform: translateX(0%)
}

.text-panel h3 {
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #aaa;
    margin-bottom: .2rem;
    font-weight: 400;
    border-bottom: 1px solid rgb(255 255 255 / .06);
    padding-bottom: .6rem
}

.text-panel .field-group {
    display: flex;
    flex-direction: column;
    gap: .4rem
}

.text-panel label {
    font-size: .7rem;
    letter-spacing: 1px;
    color: #888;
    text-transform: uppercase
}

.text-panel input[type="text"] {
    background: rgb(255 255 255 / .06);
    border: 1px solid rgb(255 255 255 / .12);
    border-radius: 30px;
    padding: .7rem 1.2rem;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    font-family: 'Arial Black', 'Arial Bold', sans-serif;
    text-transform: uppercase;
    outline: none;
    transition: 0.2s;
    letter-spacing: .5px
}

.text-panel.........完整代码请登录后点击上方下载按钮下载查看

网友评论0