<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Document</title> </head> <style> /* div{ border: 0px; border-style: solid; width: 100px; height: 100px; border-color: -webkit-linear-gradient(top,red,#fff); background: -webkit-linear-gradient(top,red,#fff);//漸變 }*/ .fv{ background: #7FBA00; width: 40px; height: 40px; border-radius: 20px; text-align: center; color: aliceblue; transition: width 0.2s linear; margin-top: 10px } .sv{ display: block; padding-left: 45px; text-align: left; width: 200px; padding-top: 10px; color: #7A7A7A; font-weight:bold; font-size: 15px; font-family: "微軟雅黑"; height: 40px; } .fv:hover{ width: 200px; color: #fff; } .sv:hover{ color: #fff; } </style> <body> <div></div> <div><a>你好>></a></div> <div><a>你好你好你好你好>></a></div> <div><a>你好你好>></a></div> <div><a>你好>></a></div> </body> </html>