Full-waveform inversion (FWI) in its classic form is a method based on minimizing the [Formula: see text] norm of the difference between the observed and simulated seismic waveforms at the receiver locations. The objective is to find a subsurface model that reproduces the full waveform including the traveltimes and amplitudes of the observed seismic data. However, the widely used [Formula: see text]-norm-based FWI faces many issues in practice. The point-wise comparison of waveforms fails when the phase difference between the compared waveforms of the predicted and observed data is larger than a half-cycle. In addition, amplitude matching is impractical considering the simplified physics that we often use to describe the medium. To avoid these known problems, we have developed a novel elastic FWI algorithm using the local-similarity attribute. It compares two traces within a predefined local time extension; thus, is not limited by the half-cycle criterion. The algorithm strives to maximize the local similarities of the predicted and observed data by stretching/squeezing the observed data. Phases instead of amplitudes of the seismic data are used in the comparison. The algorithm compares two data sets locally; thus, it performs better than the global correlation in matching multiple arrivals. Instead of picking/calculating one stationary stretching/squeezing curve, we used a weighted integral to find all possible stationary curves. We also introduced a polynomial-type weighting function, which is determined only by the predefined maximum stretching/squeezing and is guaranteed to be smoothly varying within the extension range. Compared with the previously used Gaussian or linear weighting functions, our polynomial one has fewer parameters to play around with. A modified synthetic elastic Marmousi model and the North Sea field data are used to verify the effectiveness of the developed approach and also reveal some of its limitations.