css实现玻璃磨砂背景右侧菜单效果代码

代码语言:html

所属分类:背景

代码描述:css实现玻璃磨砂背景右侧菜单效果代码

代码标签: css 玻璃 磨砂 背景 菜单

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

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

<head>

  <meta charset="UTF-8">
  

  
  
  
  
<style>
@import url('https://fonts.googleapis.com/css2?family=Halant:wght@700&family=Nunito+Sans:wght@300&display=swap');
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body{
  height: 100vh;
  width: 100vw;
  position: relative;
  background-color: #000;
  background-image: linear-gradient(to left, rgba(55,55,55,0.5), #050505);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 16px;
    font-family: 'Halant', serif;
  line-height: 1.5;
}

h1{
  max-width: 60vw;
  font-size: 24px;
  color: #d9dfd9;
  letter-spacing: 0.08rem;
  max-width: calc(100vw - 350px);
}

@media (max-width: 720px){
  h1{
    max-width: calc(100vw - 150px);
    font-size: 20px;
    line-height:1.8rem;
  }
}

h1 span{
  font-family: 'Nunito Sans', sans-serif;
  font-size: 16px;
  font-weight: 300;
  display: block;
}

ul{
  height: 100vh;
  width: 300px;
  position: absolute;
  right: 0px;
  top: 0px;
background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur( 13.5px );
    -webkit-backdrop-filter: blur(81.55px );
  list-style: none;
  
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

@media (max-width: 720px){
  ul{
    max-width: 250px;
  }
}

.btn-open{
    background: unset;
  border: unset;
  position: absolute;
  top: 16px;
  right: 16px;
}

.btn-open svg{
  stroke: #ddd;.........完整代码请登录后点击上方下载按钮下载查看

网友评论0