This study explores the slack effect at highway tunnel entrances and exits and its impact on traffic safety. Forty-five drivers conducted vehicle experiments with eye-movement data collection while driving in highway tunnels, analyzing indicator variation across tunnel areas and the relationships among light environment, visual adaptation, visual search and attention distribution. At the tunnel exit during the day and the entrance at night, illuminance changes dramatically and the white-hole effect occurs; in affected areas accident risk is high but fixation frequency in safety gaze areas is low and attention is abnormally reduced. When the environment transitions from poor to good, a slack effect arises from optimistic expectations. The combination of abnormal attention decrease (slack effect) and visual interference (white-hole effect) can seriously threaten tunnel traffic safety.