With the rapid development of Internet of Things (IoT), IoT mobile devices host more computation-intensive and real-time applications, such as face recognition, online gaming, and augmented reality/virtual reality services. This paper mainly addresses the problems of the selective resource offloading in order to achieve resource optimization in cloud-edge elastic optical networks (CE-EONs). We firstly propose two integer linear program (ILP) models to minimize both the end-to-end (E2E) latency and the total number of frequency slots by considering the latency sensitivity, followed by introducing three corresponding heuristic approaches, namely resource priority offloading (RPO), distance priority offloading (DPO), and coordinated distance and resource offloading (DRO). For comparison, we also introduced an existing resource offloading (ERO) approach in CE-EONs. On one hand, simulation results show that the DRO approach greatly approximated to the optimized solutions of ILP models in the static traffic scenario. Meanwhile, the DRO approach achieves the better performance in terms of average E2E latency. On the other hand, the proposed DRO approach can significantly reduce the blocking probability owing to much improved spectrum efficiency and achieves a graceful tradeoff between the computing resources and E2E latency compared to the RPO, DPO, and ERO approaches in the dynamic traffic scenario.