<p>文字<span class="triangle-down"></span></p>
.triangle-down {
width: 0;
height: 0;
border-left: 0.4rem solid transparent;
border-right: 0.4rem solid transparent;
border-top: 0.6rem solid darkgray;
}
怎么把小三角的位置调整到文字后面
黄舟2017-04-17 11:58:02
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
p:after {
content: "";
display: inline-block;
width: 0;
height: 0;
border-left: 0.4rem solid transparent;
border-right: 0.4rem solid transparent;
border-top: 0.6rem solid darkgray;
}
</style>
</head>
<body>
<p>文字</p>
</body>
</html>
大家讲道理2017-04-17 11:58:02
用伪元素:after
<p>文字</p>
p:after {
content: "";
display: inline-block;
width: 0;
height: 0;
border-left: 0.4rem solid transparent;
border-right: 0.4rem solid transparent;
border-top: 0.6rem solid darkgray;
}