Home > Web Front-end > HTML Tutorial > DIV定位IE正常 火狐不正常_html/css_WEB-ITnose

DIV定位IE正常 火狐不正常_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:28:11
Original
1085 people have browsed it

DIV在IE显示正常 360浏览器显示正常  火狐不正常,如果把火狐调正常,IE和360就不正常了
CSS用的是  margin-top  margin-left 来做定位
火狐显示

IE或360显示


回复讨论(解决方案)

写个兼容,类似这样:
 FF  读 margin-top:5px;

 IE7 读 *margin-top:5px;

zhituji 你好 兼容怎么写呢  我还真不会。能告诉我下详细的吗

 if (navigator.userAgent.indexOf('Firefox') >= 0)     {      // 添加火狐支持的样式    }if (navigator.userAgent.indexOf("MSIE") > 0) {               // 添加IE支持的样式            }
Copy after login

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template