-This work presents a three-dimensional finite-element algorithm, based on the phase-field model, for computing interfacial flows of Newtonian and complex fluids. A 3D adaptive meshing scheme produces fine grid covering the interface and coarse mesh in the bulk. It is key to accurate resolution of the interface at manageable computational costs.The coupled Navier-Stokes and Cahn-Hilliard equations, plus the constitutive equation for non-Newtonian fluids, are solved using second-order implicit time stepping. Within each time step, Newton iteration is used to handle the nonlinearity, and the linear algebraic system is solved by preconditioned Krylov methods. The phase-field model, with a physically diffuse interface, affords the method several advantages in computing interfacial dynamics.One is the ease in simulating topological changes such as interfacial rupture and coalescence.Another is the capability of computing contact line motion without invoking ad hoc slip conditions. As validation of the 3D numerical scheme, we have computed drop deformation in an elongational flow, relaxation of a deformed drop to the spherical shape, and drop spreading on a partially wetting substrate. The results are compared with numerical and experimental results in the literature as well as our own axisymmetric computations where appropriate. Excellent agreement is achieved provided that the 3D interface is adequately resolved by using a sufficiently thin diffuse interface and refined grid. Since our model involves several coupled partial differential equations and we use a fully implicit scheme, the matrix inversion requires a large memory. This puts a limit on the scale of problems that can be simulated in 3D, especially for viscoelastic fluids.