<!DOCTYPE html><html lang="en" dir="ltr"> ?<head> ???<meta charset="utf-8"> ???<title></title> ???<style media="screen"> ?????.callout{position: relative; ???????width: 100px; ???????height: 50px; ???????background: #f00; ?????} ?????.callout::before{ ???????content: ""; ???????position: absolute; ???????top: -.4em; left: 1em; ???????padding: .35em; ???????background: inherit; ???????border: inherit; ???????border-right:0; ???????border-bottom:0; ???????transform: rotate(45deg); ?????} ???</style> ?</head> ?<body> ???<div class="callout"> ?????Only ???</div> ?</body></html>
通过css继承来实现气泡小三角
原文地址:https://www.cnblogs.com/ron123/p/9568850.html