The invention provides an electrolyte. The electrolyte comprises modified inorganic oxide particles, a crosslinking agent, a lithium salt and a non-aqueous solvent, wherein the modified inorganic oxide particles and the non-aqueous solvent are combined and gathered together by the crosslinking agent. By the modified inorganic oxide particles, the viscosity of the liquid-state electrolyte can be improved, the mobility of a solution is reduced, the mechanical strength of a semi-solid state is improved, and a semi-solid state or quasi-solid state electrolyte is formed; meanwhile, by a synergisticeffect of the crosslinking agent and the modified inorganic oxide particles, high mechanical modulus blocking is achieved, various dendrites can be prevented from growing, so that lithium dendrites are effectively prevented, the safety of the prepared lithium metal battery is improved, the ion transfer number is increased, and the electrical conductivity is further improved; and an experimental result shows that the safety of the prepared lithium metal battery is relatively high and is not lower than 305h within short time, the electrical conductivity of the prepared lithium metal battery isrelatively high, and the ion transfer number is not lower than 0.25.