<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>H5 对话框</title>
<style>
* {
margin: 0;
padding: 0;
}
html {
font-size: 100px;
}
body {
width: 100vw;
font-size: 0.15rem;
color: #121212;
}
.dialog {
width: 100%;
height: 0.3rem;
background-color: #80b747;
color: #ffffff;
font-size: 0.14rem;
position: relative;
line-height: 0.242rem;
}
.triangle:before {
content: '';
border-right: 0.05rem solid transparent;
border-top: 0;
border-bottom: 0.05rem solid #80b747;
border-left: 0.05rem solid transparent;
position: absolute;
right: 4%;
top: 0;
margin-top: -0.04rem;
}
</style>
</head>
<body>
<div class="dialog triangle">我是对话框里的内容</div>
</body>
</html>
CSS 对话框小三角效果
最新推荐文章于 2023-10-10 16:02:46 发布