Code clone detection technology aims to automatically detect code similarity and help developers identify and reduce code duplication. While code syntax analysis-based methods are commonly used for clone detection, they may not capture semantic information due to bypassing the analysis of code text. To address this issue, this paper proposes a new method called visualization representation learning for code clone detection (VRL4CCD). This method converts source code fragments into grayscale images to preserve textual information and then utilizes VGG16 and a self-attention mechanism to extract features related to code semantic similarity. A siamese neural network is used to learn the similarity pattern between code features. Experimental results on the Big Clone Bench and Google Code Jam datasets demonstrate that VRL4CCD outperforms current clone detection methods regarding precision, recall, and F1-score, indicating the effectiveness of code visualization technology in clone detection tasks.