鼠标滑过文字时,文字高亮显示

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>

.box {width: 280px; display:inline-block; color: #FFFFFF; background: #51930a; text-align: center;margin:0px auto;}
.box:hover { background: #76cf16; -moz-transition: all 1s ease 0s; -webkit-transition:all 1s ease 0s; transition:all 1s ease 0s; -o-transition:all 1s ease 0s;}
</style>
</head>

<body>
<div class="box">我有背景颜色的切换哦</div>
</body>
</html>

猜你喜欢

转载自www.cnblogs.com/mm2015/p/9088094.html