这样的箭头用CSS-3实现,整段代码如下:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"/> <title>Document</title> <style type="text/css"> .u-scrollLoad-tips{color:#767676;text-align:center;height:40px;line-height:40px;text-decoration:none;display:block;background:#f4f4f4;} .u-scrollLoad-tips i{display:inline-block;position:relative;vertical-align:top;width:10px;height:10px;} .u-scrollLoad-tips i:after{content:‘‘;display:block;width:8px;height:8px;border-color:#767676 #767676 transparent transparent;border-width:1px;border-style:solid;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg);top:15px;left:5px;position:absolute;} </style> </head> <body> <a href="#" class="u-scrollLoad-tips">点击查看更多论坛互动<i></i></a> </body> </html>
箭头在各移动浏览器都能正常显示,但在安卓 2.x 自带的原生浏览器就出现了问题,箭头方向不对,如下图:
解决方案:
给.u-scrollLoad-tips i 添加 此属性即可解决
-webkit-transform:translate(0px,0px) translateZ(0px);-ms-transform:translate(0px,0px) translateZ(0px);-o-transform:translate(0px,0px) translateZ(0px);transform:translate(0px,0px) translateZ(0px);
时间: 2024-11-03 23:47:51