JS css3弹出浮动提示框ui特效代码下载



如需定制开发(网站开发、二次开发)在线咨询,请点击>> QQ:753511799

9 32 11



特效描述:弹出浮动 提示框ui。原生js css3弹窗提示框,点击按钮弹出浮动提示层。主要内容提示框,警告提示框,成功提示框代码。

代码结构

1. 引入CSS

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
<link rel="stylesheet" href="css/style.css">

2. 引入JS

<script  src="js/script.js"></script>

3. HTML代码

<h1>提示框</h1>
<div class="toast__actions">
  <button class="toast__trigger">内容提示</button>
  <button class="toast__trigger">警告提示</button>
  <button class="toast__trigger">成功提示</button>
</div>
<section class="toast__container">
  <div class="toast">
    <div class="toast__icon" role="alert" aria-live="assertive" aria-atomic="true">
      <svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="info-circle" class="svg-inline--fa fa-info-circle fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
        <path fill="currentColor" d="M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"></path>
      </svg>
    </div>
    <div class="toast__content">
      <h2>主要内容</h2>
      <p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Labore cumque nesciunt quod, eius error officiis aut excepturi repellat asperiores cum, neque eveniet voluptatum. Quae necessitatibus velit dolore quidem facere repellat!</p>
    </div>
  </div>
  <div class="toast toast--warning" role="alert" aria-live="assertive" aria-atomic="true">
    <div class="toast__icon">
      <svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="exclamation-circle" class="svg-inline--fa fa-exclamation-circle fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
        <path fill="currentColor" d="M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"></path>
      </svg>
    </div>
    <div class="toast__content">
      <h2>警告!</h2>
      <p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Labore cumque nesciunt quod, eius error officiis aut excepturi repellat asperiores cum, neque eveniet voluptatum. Quae necessitatibus velit dolore quidem facere repellat!</p>
    </div>
  </div>
  <div class="toast toast--success" role="alert" aria-live="assertive" aria-atomic="true">
    <div class="toast__icon">
      <svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="check-circle" class="svg-inline--fa fa-check-circle fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
        <path fill="currentColor" d="M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"></path>
      </svg>
    </div>
    <div class="toast__content">
      <h2>全部正确</h2>
      <p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Labore cumque nesciunt quod, eius error officiis aut excepturi repellat asperiores cum, neque eveniet voluptatum. Quae necessitatibus velit dolore quidem facere repellat!</p>
    </div>
  </div>
</section>



用户评论
大牛,别默默的看了,快登录帮我点评一下吧!:)      登录 | 注册


热门标签: 页面 右键菜单 文字提示框 提示框/弹出层 layer lightbox Tooltip工具提示框 浮动提示框 html5弹窗动画 弹出层拖动 窗口提示框

×
×
51前端

注册

×
绑定手机

请绑定手机号,在继续操作

×
单次下载支付

应付金额:279

支付完成后,回到下载页面,在进行下载

官方QQ群
意见反馈
qq群

扫描上面二维码加微信群

官方QQ群

jQuery/js讨论群
群号:642649996
Css3+Html5讨论群
群号:322131262

加群请备注:从官网了解到