How does elevation affect temperture

2 answers

http://www.newton.dep.anl.gov/askasci/wea00/wea00131.htm
The sun shine comes down in electro magnatic way and then it doesn't hit the air.It hits the earth directly and it becomes hot.This temperature can't reach in elevation.So the temperature differs from elevation to earth/soil,I think.Thank you.