Collection of css style tricks

css trick one:

    The parent element gives width: 100%, and height is set to 0. At this time, padding-top: 100% is added. The 100% of paddingTop is effective relative to 100% of the width, so the current state of the parent element is a width and height. equal boxes. Generally, this is to solve the problem that the height of the picture introduced in the parent element stretches the height of the parent element excessively.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324776953&siteId=291194637