For face anti-spoofing, many methods have been proposed to improve the security of face recognition systems. Due to distribution discrepancies among different domains, it is difficult to seek a generalized space which can generalize well to unseen attacks. In this paper, we propose a framework based on meta-learning method to improve the generalization ability of face anti-spoofing. The feature extractor is trained with forcing the distribution of real faces more compact while the distribution of fake faces is more dispersed among domains. Then we add a hybrid-domain meta learner module to simulate multiple domain shift scenarios. Moreover, we add a refined triplet mining to constrain the distance between real faces and fake ones. Multiple gradient information is integrated to optimize the feature extractor and train the model with good generalization performance to unseen attacks of various scenarios. Extensive experiments on four public datasets show that our proposed method can get better generalization ability to unseen target domain compared with state-of-the-art methods.