css,響應鼠標事件,文字變色
阿新 • • 發佈:2019-02-07
utf-8 spl add hover ont borde eight true 文字
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>hover</title> </head> <body> <style type="text/css"> .s1{ /*background-color: gold;*/ font-size:0; } .s1 span{ width:98px; height: 30px; border:1px solid black; display:inline-block; padding: 0; font-size:16px; margin-left:-1px; text-align: center; line-height: 30px; } .s1 span:hover{ background-color: gold; } </style> <div class="s1"> <span>標題</span> <span>標題</span> <span>標題</span> <span>標題</span> </div> </body> </html>
css,響應鼠標事件,文字變色