A new class of exact solutions of nonlinear and linearized Navier–Stokes equations has been proposed, which generalize the well-known family of exact solutions in which the velocity is linear in some coordinates. The case of the quadratic dependence of the velocities on two horizontal (longitudinal) coordinates with coefficients that are the functions of the vertical (transverse) coordinate and time was considered in detail. The solutions were generalized for rotating liquids. Equations for constructing exact solutions with an arbitrary dependence of velocities on the horizontal coordinates were derived.