问题

我们想知道如何悬停更改按钮文字。

 

实现方法:

<!DOCTYPE html>
<html>
<head>
<  type=\'text/ \'
  src=\'/js/lib/mootools-core-1.4.5-nocompat.js\'></ >
<style type=\'text/css\'>
button {<!-- http://www.manongjc.com 码农教程 -->
  width: 6em
}

button:hover span {
  display: none
}

button:hover:before {
  content: \"Reply!\"
}
</style>

</head>
<body>
  <button>
    <span>3 replies</span>
  </button>
</body>
</html>
收藏 打印