Eco-driving has been widely investigated over the last decade, but most studies focused on an individual vehicle or a vehicle platoon consisting of pure connected and automated vehicles (CAVs). Recently, mixed vehicle platoons consisting of both CAVs and human-driven vehicles (HDVs) have attracted much interest, considering the fact that HDVs will mix with CAVs in the traffic system for a long period. This paper proposes an eco-driving strategy for mixed platoons, composing of both offline planning and online tracking. In offline planning, an energy-efficient speed reference and a gearshift reference are determined by using the characteristics of each vehicle and future traffic information through dynamic programming. Offline planning optimised the vehicle speed and gearshift to allow the vehicle powertrain working at a high efficiency region. In online tracking, two different types of model predictive controls (MPCs) are proposed to control the CAVs in real-time. The MPCs are designed to achieve precise speed reference tracking performance and guarantee platoon string stability, respectively. Meanwhile, HDVs within the mixed platoon can be located anywhere in the platoon except working as the first vehicle to improve flexibility. Therefore, the proposed eco-driving strategy is applicable to mixed platoons with more general structures in ordering. The key contribution of this study is that the proposed eco-driving strategy can optimise the total fuel consumption for general mixed platoons. Simulation results show that the proposed ecodriving strategy improves the fuel economy of a mixed platoon by up to 6.39% compared to the benchmark conventional-adaptive cruise control strategies.