Use of a cosmetic composition comprising one or more volatile linear alkane and one or more nonionic associative polymers, in a medium, for conditioning of keratin fibers, preferably hair, is claimed. An independent claim is included for a cosmetic composition comprising one or more volatile linear alkane, and one or more nonionic associative polymer, where the nonionic associative polymer is: cellulose modified by a group comprising at least one fatty chain; hydroxypropyl guar modified by a group comprising at least one fatty chain; copolymer of methacrylate or 1-6C alkyl acrylate and amphiphilic monomer comprising at least one fatty chain; copolymer of methacrylate or hydrophilic acrylate and hydrophobic monomer comprising at least one fatty chain; polyurethane polyether comprising in their chain, both a hydophilic block such as polyoxyethylene and hydrophobic block, which are aliphatic chain alone and/or in combination with cycloaliphatic and/or aromatic chain; and polymer having aminoplast ether block comprising at least one fatty chain.