In terms of fashion, Shanghai is a modern,open-minded city, so vistors should feel free to dress as they do in their home country. Do keep in mind, however, that westerners already stand out from the crowd, so unless you are looking for extra attention it may be better to avoid anything too racy or provocative.
Shanghai is a typically temperate seasonal location. Winters can be very cold and wet, so hats, scarves, a waterproof coat and even rubber boots are useful attire, while summer brings with it stifling heat and drenching humidity, so light, loose clothes and a thin raincoat are essential. If you are out and about in the mild Shanghai spring or autumn, summer clothes with an additional pullover or jacket are adequate. The streets are dirty and often wet, so choose closed-toe sandals over flip-flops. Many cinemas, restaurants and offices crank up the air-conditioning during the summer months, so bring an extra layer of clothing just in case.