May 29, 2021 Article blog
When we write a web page, which is often called an HTML file, we need to run it to show it as a web page. D ifferent browsers can cause different results to work differently, which is a compatibility issue. W hat are some of the common compatibility issues in the front end that are compiled in this article, W3Cschool? How do I fix it?
Compatibility issues occur because of differences in the browser kernel, resulting in differences in resolution. There are two main types of browser kernels that we commonly use: the rendering engine and the js engine.
There are four most common browser cores: Trident, Gecko, Blink, Webkit
IE browser | Trident core |
Chrome browser | Webkit kernel, now is a Blink kernel |
Firefox browser | Gecko kernel, commonly known as the Firefox kernel |
Safair browser | Webkit kernel |
Opera browser | It is a BLINK core |
360 browser | IE + chrome double kernel |
Cheetah browser | IE + chrome double kernel |
Baidu browser | IE kernel |
QQ browser | TRIDENT + Webkit (High Speed Mode) |
How to fix it: Add wildcards to css
* { margin: 0; padding: 0; }
How to fix it: Add
display:inline
to the float style label to convert it into in-row properties.
How to fix this: Set
overflow:hidden
for labels that exceed height, or set the value of line-height to be less than the height you set.
How to fix it: Use float for
img
layout
How to fix: Set table style to
table-layout:fixed,td为word-wrap:break-word
How to fix it:
opacity: 0.5;filter: alpha(opacity = 50);filter: progid:DXImageTransform.Microsoft.Alpha(style = 0, opacity = 50);
How to fix it: Both are set to
float
How to resolve: In order not to overlap the edges, you can add a parent element to the child element and set the parent element to
overflow:hidden
How to fix it: Use
cursor:pointer
uniformly.
How to fix it: Parent element
position:relative
These are common front-end compatibility issues for small orchestration, as well as solutions to compatibility issues. For more front-end compatibility issues to resolve, follow the HTML tutorial.