div+css实现iframe手机框架底部玻璃图标菜单栏效果代码

代码语言:html

所属分类:布局界面

代码描述:div+css实现iframe手机框架底部玻璃图标菜单栏效果代码,整个是一个手机的样式,iframe内嵌其中。

代码标签: div css iframe 手机 框架 底部 玻璃 图标 菜单栏

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

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

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

  
  
  <link rel='stylesheet' href='https://fonts.googleapis.com/css2?family=Zeyada&amp;display=swap'>
  
<style>
@import url('https://fonts.googleapis.com/css2?family=Manrope');


body {
  background: rgb(2, 6, 23);
  height: 100svh;
  display: grid;
  place-items: center;
  
  font-family: "Manrope", sans-serif;
  color: white;
  font-size: clamp(1.5rem, 2vw + 1rem, 2.5rem);
  
  padding: 1rem;
}

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

body > svg {
  position: absolute;
  opacity: 0;
  height: 0;
  width: 0;
  pointer-events: none;
}

main {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr auto;
  
  border: 3px solid #fff2;
  box-shadow: 0 8px 32px 0 #000;
  border-radius: 1em;
  overflow: hidden;
  
  max-width: 20rem;
  width: 100%;    
  > * {
    grid-column: 1;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

.wrapper {
  height: 80vh;
  grid-row: 1/-1;
  flex: 1;
  overflow: hidden;
  position: relative;
}

iframe {
  width: 100%;
  height: 100%;
  height: 150%;
  z-index: 1;
}

img.preview {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: -1;
  object-fit: cover;
}

nav {
  grid-row: 2;
  padding: 1.5rem;
  
  display: flex;
  justify-content: space-between;
  
  background: #0002;
  backdrop-filter: contrast(.9) blur(7px) url(#fluted);
  box-shadow: 0 8px 32px 0 #0008;
  
  > a {
    display: flex;
    align-items: center;
  }
  
  svg {
    width: 1.5rem;
    height: 1.5rem;
  }
}


a.highlight {
  background: #0002;
  padding: .25rem 1.5rem;
  border-radius: 1em;
  border: 3px solid #fff2;
  backdrop-filter: blur(10px);
}
</style>


  
  
</head>

<body translate="no">
  <main>
  <div class="wrapper">
    <img class="preview" src="//repo.bfw.wiki/bfwrepo/image/65d420961a6f5.png" alt=""/>
    <iframe src="https://www.bfw.wiki" frameborder="0"></iframe>
  </div>
  <nav>
    <a href="#"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
        <use href="#tabler--archive" />
      </svg></a>
    <a href="#" class="highlight">
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
        <use href="#tabler--search" />
      </svg>
    </a>
    <a href="#"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
        <use href="#tabler--send" />
      </svg></a>
  </nav>
</main>

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" color-interpolation-filters="sRGB">

  <filter id="fluted" primitiveUnits="objectBoundingBox">
    <feImage x="0" y="0" in="blur_0" result="image_0" crossorigin="anonymous" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/.........完整代码请登录后点击上方下载按钮下载查看

网友评论0