css: Mouse over the img tag to replace the src path

After searching on the Internet, I finally found a way to replace the src path with the mouse through the img tag in the css. Because the project uses the vue framework, I don’t want to introduce jquery and native js, which is inconvenient.
Precondition: Chrome browser

<img src="../../assets/icon/edit.png" class="editImgSty">

.editImgSty:hover {
    
    
	content: url(../icon/addForm.png);
}

Guess you like

Origin blog.csdn.net/weixin_43908123/article/details/108048571