效果
image.png
鼠标悬停
image.png
<!DOCTYPE html>
<html>
<head>
<title>test</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="./cpcss.css">
</head>
<style>
.xllfanyibtn {
margin: 0 auto;
writing-mode: vertical-lr;
width: 54px;
height: 200px;
background: #FFFFFF;
border: 1px solid #DDDDDD;
padding: 13px 17px;
box-sizing: border-box;
cursor: pointer;
color: #000;
}
.xllfanyibtn span {
width: 23px;
height: 23px;
display: inline-block;
background: #4282EB;
border-radius: 50%;
color: #fff;
line-height: 23px;
text-align: center;
float: left;
margin-bottom: 12px;
}
</style>
<body>
<div class="xllfanyibtn"><span>译</span>
<div style="margin-top: 10px;">将本页翻译成中文</div>
</div>
<script src="../js/jquery-3.1.1.min.js"></script>
<script>
$(".xllfanyibtn").hover(function () {
$(".xllfanyibtn").css("background-color", "#4683EA");
$(".xllfanyibtn div").css("color", "#fff");
$(".xllfanyibtn span").css("background-color", "#fff");
$(".xllfanyibtn span").css("color", "#4683EA");
}, function () {
$(".xllfanyibtn").css("background-color", "#fff");
$(".xllfanyibtn div").css("color", "#000");
$(".xllfanyibtn span").css("background-color", "#4683EA");
$(".xllfanyibtn span").css("color", "#fff");
});
</script>
</body>
</html>
网友评论