CSS阴影优化气泡框样式

xml 复制代码
<body>
<div class="pop">气泡框</div>
</body>
css 复制代码
body{
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%
}
.pop{
  display: flex;
  justify-content: center;
  align-items: center;
  background: #409eff;
  width: 150px;
  height: 70px;
  position: relative;
  border-radius: 5px;
  color: #fff;
  /** box-shadow: 0 0 10px #000;   换成filter*/
  filter: drop-shadow(0 0 10px #000) 
 /** filter表示滤镜  drop-shadow表示阴影滤镜 */
}
.pop::before{
  content: '';
  background: #409eff;
  position: absolute;
  width: 20px;
  height: 20px;
  transform: rotate(45deg);
  left: -10px;
  top: 50%;
  margin-top: -10px;
}
相关推荐
旧梦吟37 分钟前
脚本网页 三人四字棋
前端·数据库·算法·css3·html5
打工人小夏3 小时前
vue3使用transition组件,实现过度动画
前端·vue.js·前端框架·css3
奶球不是球17 小时前
elementplus组件中el-calendar组件自定义日期单元格内容及样式
javascript·css·css3
❆VE❆2 天前
tailwindcss:安装避坑,从 0 到项目跑通
前端·javascript·vue.js·css3·组件·tailwindcss
旧梦吟3 天前
脚本网页 地球演化
前端·算法·css3·html5·pygame
Wiktok4 天前
tailwindcss常用类名写法及其含义
css3·tailwindcss
阿珊和她的猫5 天前
CSS3新特性概述
前端·css·css3
三十_A6 天前
如何正确实现圆角渐变边框?为什么 border-radius 对 border-image 不生效?
前端·css·css3
冰暮流星6 天前
css3如何引入外部字体
前端·css·css3
行走的陀螺仪7 天前
重绘和重排怎么触发?怎么优化?
前端·css·性能优化·css3·浏览器原理