.font1 { padding: 50px; font-family: 'Courier New', Courier, monospace; opacity: 1; position: absolute; transition-duration: 5s; transition-property: opacity; } .font1:hover { opacity: 0; } .font2 { padding: 50px; font-family: Verdana, Geneva, Tahoma, sans-serif; opacity: 0; position: absolute; transition-duration: 5s; transition-property: opacity; } .font2:hover { opacity: 1; }