css 圆角 兼容手机怎样处理

html-css012

css 圆角 兼容手机怎样处理,第1张

css3中的 border-radius一般是兼容手机web的,你如果想让页面更好的兼容手机端,可以添加meta来适配各种手机。例:<!-- Mobile Devices Support @begin -->

<meta content="no-cache,must-revalidate" http-equiv="Cache-Control" />

<meta content="no-cache" http-equiv="pragma" />

<meta content="0" http-equiv="expires" />

<meta content="telephone=no, address=no" name="format-detection" />

<meta content="width=device-width, initial-scale=1.0" name="viewport" />

<meta name="apple-mobile-web-app-capable" content="yes" />

<!-- apple devices fullscreen -->

<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />

<!-- Mobile Devices Support @end -->

1、使用border-radius。ie下需要在css中写behavior: url(ie-css3.htc)具体代码自己搜索一下,肯定能搜到的。

2、使用圆角图片做背景。缺点是需要多一些DIV和css,但是兼容性更好。