请老师帮检查下代码,谢谢~

来源:2-14 编程练习

慕瓜2033872

2021-04-28 17:56:22

相关代码:

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
#myTest{
width: 100px;
height: 100px;
text-align: center;
line-height: 100px;
background-color: #f43838;
margin: auto;
margin-top: 100px;
color: #FFF;
cursor: pointer;
font-size: 20px;
font-weight: bold;
/*添加代码*/
border-radius:0;
transition:border-radius transform background-color 0.5s linear 0s;
}
#myTest:hover{
/*添加代码*/
border-radius:50%;
transform:scale(2);
background-color:green;
}
</style>
</head>
<body>
<div id="myTest"> duang! </div>
</body>
</html>


写回答

1回答

好帮手慕星星

2021-04-28

同学你好,测试代码没有过渡效果,这是因为多个属性设置过渡方式不对,简单方式可以写为all

http://img.mukewang.com/climg/60893420098759aa08690160.jpg

或者分开属性写

http://img.mukewang.com/climg/6089348409665d9908860200.jpg

自己再测试下,祝学习愉快!

0

0 学习 · 15276 问题

查看课程