Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the common CSS compatibility problems at the front end?

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article introduces what are the common CSS compatibility problems in the front end, the content is very detailed, interested friends can refer to, I hope it can be helpful to you.

Common compatibility problems with front-end CSS, troublesome CSS compatibility. Because the previous understanding of css is not deep enough, and there is no systematic learning, so I once thought that css is the most difficult thing in the front end, but after really learning, I found that css is really difficult.

Common compatibility issues with CSS

1. Double floating BUG:

Description: after the float attribute is set for the block element, the horizontal edge value is set, and the edge value displayed under IE6 is larger than the set value.

Solution: add display:inline; to the element of float and convert it to inline element

2. The row heights of the form elements are inconsistent:

Solution:

①, add vertical-align:middle to form elements

②, add float:left to form elements

3. IE6 (default 16px is minimum) does not recognize tags with smaller height (usually 10px):

Solution:

①, add overflow:hidden to the tag

②, add font-size:0 to the tag

4. When adding a hyperlink to an image, there will be a blue border in the IE browser:

Solution:

Add border:0 or border:none to the picture

What are the CSS compatibility issues?

Minimum height min-height is not compatible with IE6

Solution:

① 、 min-height:100px;_height:100px

②, minmuri heightlu 100px position heightlly autogenous importantlt heightlly 100px

The picture has a gap by default:

Solution:

①, add float attribute to img

②, add display:block to img

What are the common front-end CSS compatibility issues to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report