CSS实现消息框中带阴影效果的三角形箭头

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>CSS实现消息框中带阴影效果的三角形箭头</title>
  <style>
    .box {
      position: relative;
      width: 600px;
      height: 400px;
      background: #fff;
      border: 1px solid #ccc;
      box-shadow: 2px 2px 2px #ccc;
    }
    .box:after {
      position: absolute;
      display: inline-block;
      top: 380px;
      left: 300px;
      width: 0;
      height: 0px;
      content: '';
      border-style: solid;
      border-width: 20px;
      border-color: #fff #fff transparent transparent;
      transform: rotate(135deg);
      box-shadow: 2px -2px 2px #ccc;
    }
  </style>
</head>
<body>
  <div class="box">
  </div>
</body>
</html>
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。