扫码关注官方订阅号
想问下table单元格内这种如图这种效果是怎么实现的,(这种是类似悬浮的效果还是水印的效果)
用:after伪类实现
<!DOCTYPE html> <html> <head> <title></title> </head> <body> <table border=1> <tr> <td class="undiscuss"> 正常 </td> </tr> <tr> <td class="discuss"> 异常 </td> </tr> </table> <style type="text/css"> td{padding: 20px 60px; position: relative;} td.undiscuss:after,td.discuss:after{ position: absolute;right:0;top:0;padding:3px 5px; } td.undiscuss:after{ border:1px solid green;color:green;content: "待处理"; } td.discuss:after{ border:1px solid orange;color:orange;content: "已处理"; } </style> </body> </html>
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
用:after伪类实现