Glance has two meanings:
• verb 1 take a brief or hurried look. 2 strike at an angle and bounce off obliquely.
In the first : He glanced at the pretty girl - "glance" always takes "at"
In the second : The ball glanced off the roof - here "glance" always takes "off"
Student or Learner