Due to the difference of heat absorption, the air temperature in the cloud is higher than that in the surrounding air. The higher the air temperature, the smaller the density, which is the same as the principle of hot air balloon: the air expands when it heats up and contracts when it cools.
Every cloud is a hot air balloon, and water vapor is a passenger carried by the hot air balloon. At high altitude, the density of gas is decreasing, and when clouds rise to a height equal to their own density, they will be suspended in the air.
Extended data:
Clouds absorb heat from the ground and reflect it back, which helps to keep the earth warm. However, clouds also reflect sunlight directly back into space, which has a cooling effect. Which effect is dominant depends on the shape and location of the cloud.
In the atmosphere more than ten kilometers from the ground, the closer to the ground, the higher the temperature and the richer the air; The higher the altitude, the lower the temperature and the thinner the air.
On the other hand, the water surface of rivers, lakes and seas, as well as the moisture of soil, animals and plants, evaporates into the air and becomes water vapor. After water vapor enters the atmosphere, it turns into clouds to cause rainfall, or condenses into frost dew, and then returns to the ground, permeates the soil or flows into rivers, lakes and seas. Later it will evaporate (vaporize) and then condense (condense) and drop. It goes on and on.
Water vapor enters the lower atmosphere from the evaporation surface, which has a high temperature and a lot of water vapor. If the hot and humid air is lifted, the temperature will gradually decrease, and when it reaches a certain height, the water vapor in the air will reach saturation. If the air continues to be lifted, there will be excess water vapor.
If the temperature there is higher than 0℃, the excess water vapor will liquefy into small water droplets; If the temperature is lower than 0℃, excess water vapor condenses into small ice crystals. When these small water droplets and small ice crystals gradually increase to a level that can be recognized by human eyes, what we call clouds are formed. [Note: When the air pressure at high altitude decreases, the freezing point of water will increase and be higher than 0℃]
References:
Baidu Encyclopedia-Cloud