We propose an energy-efficient resource block (RB) assignment and power control strategy for underlay device-to-device (D2D) communications in multi-cell networks, where more than one D2D pair is allowed to share the same RBs with cellular user equipments (CUEs). We first formulate the problem as a nonconvex mixed-integer fractional programming problem, which is NP-hard, and then separate the problem into two subproblems, namely RB assignment and power control, to design a two-stage energy-efficient strategy with reasonable complexity. During the first stage, the RBs are assigned to CUEs by a sequential geometric programming (SGP) algorithm and a rate-based round algorithm, while during the second stage, the power control strategy for CUEs and D2D pairs is designed using the SGP algorithm. Numerical simulations are conducted to examine the convergence behavior of our proposed strategy, as well as to evaluate the impact of system parameters on the performance of our proposed strategy.