Reliable state of health (SOH) estimation is significant for safe operation of lithium-ion batteries (LIBs). However, due to the strong nonlinearity of battery degradation and complex working conditions, feature-based SOH estimation method is hard to apply in real-world scenes. In this paper, we developed a hybrid neural network model with attentional mechanisms to achieve SOH estimation for LIBs. The developed model is composed of convolution neural network (CNN), convolutional block attention module (CBAM), and long short-term memory (LSTM) neural network, named as CNN-CBAM-LSTM. The CBAM can realize the sequential attention structure from channel to spatial, which reduces the influence of noise in the raw data and enhances the ability of the CNN to extract health features. Moreover, under various operating conditions and data sampling modes, we demonstrate that high accuracy estimation can be achieved by directly considering charging voltage segments as model inputs. Finally, transfer learning with fine-tuning strategy is conducted to achieve SOH estimation under different battery operating conditions. The developed method is validated with two public datasets, and the root mean square errors and mean absolute error of the best estimation results are 0.17 % and 0.14 %, respectively.