Vehicle detection is an important component of intelligent transportation systems and autonomous driving. However, in real-world vehicle detection scenarios, the presence of many complex and high uncertainty factors, such as illumination differences, motion blur, occlusion, weather, etc., makes accurate and real-time vehicle detection still challenging. In order to reduce the influence of these uncertainties in real scenarios and improve the accuracy and real-time performance of vehicle detection, this paper proposes a type-1 fuzzy attention (T1FA), in which fuzzy entropy is introduced to re-weight the feature map in order to reduce the uncertainty of the feature map and facilitates the detector's focus on the target center as a way to effectively improve the accuracy of vehicle detection. Furthermore, to detect vehicles with different sizes more effectively, mixed depth convolution in MetaFormer (MDFormer) is employed as a token mixer to capture multi-scale perceptual fields. And a novel YOLO detector based on fuzzy attention (YOLO-FA) is proposed. Experimental results show that T1FA can boost 3.2% AP50 on challenging vehicle detection dataset UA-DETRAC, which is better than other commonly used attention mechanisms, especially in scenarios of rain and nighttime with higher uncertainty by 4.2% and 8.1% AP50, respectively. Finally, without pretraining on extra data, YOLO-FA achieves 70.0% AP50 and 50.3% AP on UA-DETRAC, which achieves better balance between accuracy and speed compared with state-of-the-art detectors. The remarkable improvement of T1FA in different detectors and datasets also shows the considerable generalization of T1FA.