Agents for treating fibers containing keratin containing in a cosmetically acceptable carrier (a) at least one cross-linked, amphiphilic, anionic polymer, comprising at least one structural unit of formula (I) and at least one structural unit of formula (II) and (b) at least one non-cross-linked, amphiphilic, anionic polymer, comprising at least one structural unit of the formula (III) and at least one structural unit of the formula (IV), said agents being suitable for temporarily deforming hair and for conditioning hair, in particular in the form of a hair cream or a hair gel.