We identify the scaling limit for the sizes of the largest components at criticality for inhomogeneous random graphs with weights that have finite third moments. We show that the sizes of the (rescaled) components converge to the excursion lengths of an inhomogeneous Brownian motion, which extends results of Aldous (1997) for the critical behavior of Erdos-Rényi random graphs. We rely heavily on martingale convergence techniques, and concentration properties of (super)martingales. This paper is part of a programme initiated in van der Hofstad (2009) to study the near-critical behavior in inhomogeneous random graphs of so-called rank-1