Comments (2)
为何会出现浏览器兼容问题
- 同一产品,版本越老 bug 越多
- 同一产品,版本越新,功能越多
- 不同产品,不同标准,不同实现方式
处理兼容问题的思路
- 要不要做
产品的角度(产品的受众、受众的浏览器比例、效果优先还是基本功能优先)
成本的角度 (有无必要做某件事)
2.做到什么程度
让哪些浏览器支持哪些效果
3.. 如何做
根据兼容需求选择技术框架/库(jquery)
根据兼容需求选择兼容工具(html5shiv.js、respond.js、css reset、normalize.css、Modernizr)
postCSS
条件注释、CSS Hack、js 能力检测做一些修补
- 渐进增强(progressive enhancement): 针对低版本浏览器进行构建页面,保证最基本的功能,然后再针对高级浏览器进行效果、交互等改进和追加功能达到更好的用户体验
- 优雅降级 (graceful degradation): 一开始就构建完整的功能,然后再针对低版本浏览器进行兼容。
from frontend-interview.
1.不同浏览器的解析器实现不同。
2.渐进增强, 优雅降级
from frontend-interview.
Related Issues (20)
- JS 作用域链相关问题 HOT 5
- JS 作用域、原型链 HOT 3
- 重复声明两个函数会怎样? HOT 4
- ES5中“严格模式”与“非严格模式”的区别? HOT 3
- ajax请求序列化问题 HOT 5
- 循环/闭包/setTimeout/Promise 综合 HOT 1
- 服务端如何区分不同的用户 HOT 4
- 使用ES6实现该方法 HOT 13
- dom操作相关 HOT 7
- 什么是FP?与OOP的关系?
- 前端性能优化 HOT 2
- JavaScript 分组 HOT 13
- 自适应和响应式有什么区别和联系
- 如何实现深拷贝? HOT 1
- 两个js数组相关题目 HOT 7
- 面试题汇总
- jrg interview questions HOT 7
- 实现一个深拷贝 HOT 8
- 宏任务微任务题 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from frontend-interview.