关于一个transform的问题
老师,请问chrome是不支持transform中的rotate属性吗?我不知道这个为什么不能显示效果?代码如下:<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Transform</title>
<style type="text/css">
p{
padding: 5px;
border:medium double black;
background-clip: lightgray;
font-family: sans-serif;
}
#banana{
font-size: x-large;
border:medium solid black;
color:white;
background-color:green;
padding:4px;
/*-moz-transform:rotate(-45deg) scaleX(1.2);
-moz-transform-origin:right top;*/
}
#banana:hover{
-moz-transition-duration:1.5s;
-moz-transform:rotate(360deg);
}
</style>
</head>
<body>
<p id="friuttext">
There are lots of different kinds of fruit-here are over 500 varities of<span id="banana">banana</span> alone.By the time we add the countless types of apples ,oranges,and other well-knownfruits,we are faced with thousands of chioces.
</p>
<script type="text/javascript">
document.write("compatMode:"+document.compatMode);
</script>
</body>
</html>
正在回答
你测试一下,我帮你完善的这个
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Transform</title>
<style type="text/css">
p{
padding: 5px;
border:medium double black;
background-clip: lightgray;
font-family: sans-serif;
}
#banana{
display: inline-block;
width:100px;
font-size: x-large;
border:medium solid black;
color:white;
background-color:green;
padding:4px;
/*-moz-transform:rotate(-45deg) scaleX(1.2);
-moz-transform-origin:right top;*/
}
#banana:hover{
-webkit-transition-duration:1.5s;
-webkit-transform:rotate(360deg);
}
</style>
</head>
<body>
<p id="friuttext">
There are lots of different kinds of fruit-here are over 500 varities of<span id="banana">banana</span> alone.By the time we add the countless types of apples ,oranges,and other well-knownfruits,we are faced with thousands of chioces.
</p>
<script type="text/javascript">
document.write("compatMode:"+document.compatMode);
</script>
</body>
</html>
- 参与学习 人
- 提交作业 2198 份
- 解答问题 5012 个
如果你有web端基础,既想进阶,又想进军移动端开发,那就来吧,我们专题为你带来的课程有HTML5、CSS3、移动基础、响应式、bootstrap、less等,让你在前端道路上畅通无阻!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星