css的Popover API实现底部弹出文字消息弹出层效果代码

代码语言:html

所属分类:弹出层

代码描述:css的Popover API实现底部弹出文字消息弹出层效果代码

代码标签: css Popover API 底部 弹出 文字 消息 弹出层

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

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

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

  <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Freeman&display=swap" rel="stylesheet">
  
  
  
<style>
@import "https://unpkg.com/open-props";

.info-tip {
  position: relative;
}


#info-tip-content {
  animation: var(--animation-slide-in-up) forwards;
  background: #000;
  color: currentcolor;
  font-size: .85em;
  padding: .35rem;
  position: absolute;
  top: 150px;
  left: 0;
}

.info-tip-button {
  align-items: center;
  background: none;
  border: 0;
  color: currentcolor;
  display: inline-flex;
  font-family: inherit;
  font-size: 1.5rem;
  gap: 1rem;
  position: relative;
}

.info-tip-button__icon {
  position: relative;

  svg {
    background: #fff;
    border-radius: 50%;
    max-inline-size: 50px;
    position: relative;
    z-index: 1;
  }

  &::before {
    aspect-ratio: 1;
    background: linear-gradient(
      130deg,
      #ff7a18,
      #af002d 41.07%,
      #319197 76.05%
    );
    border-radius: 50%;
    content: "";
    inset-block-end: 5px;
    position: absolute;
    width: 100%;
  }
}

[popover] {
  border: 0;
}

@layer base {
  html {
    background-color: #262626.........完整代码请登录后点击上方下载按钮下载查看

网友评论0