只加z-index是不起作用的,需要设置position:z-index: 99999;position: fixed; // 或absolute 上一篇: 给文字增加阴影效果代码 下一篇:禁止查看网页源代码的JS实现方法