代码如下:
<div>
<div style="position: relative; height: 20px; width: 500px; border: 1px solid #ccc">
<div style="position: absolute; height: 20px; width: 77.1%; background: #FF6666; color: #000;"></div>
<div style="position: absolute; width: 100%; text-align: right;">77.1%</div>
</div>
</div>
效果如下: