如何让字体的大小保持不变?
来源:3-3 编程练习
慕村7338132
2018-07-22 18:46:03
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>3-1作业</title>
<style>
div {
font-size: 14px;
font-weight: bold;
line-height: 50px;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 200px;
height: 50px;
margin: auto;
cursor: pointer;
text-align: center;
background: #abcdef;
transform:scale(1) rotate(0deg);
transition:transform 2s ease-in-out;
}
div:hover{
transform:scale(2) rotate(360deg);
transition:transform 2s ease-in-out 1s;
}
</style>
</head>
<body>
<div>www.imooc.com</div>
</body>
</html>
1回答
好帮手慕夭夭
2018-07-23
经过测试 ,css代码可以如下修改 :
hover时改变宽高
div样式设置如下
完善一下哦 , 望采纳 , 祝学习愉快 !
相似问题