Following is the code
<html>
<head>
<title>Facing issue while applying css tranform properties to DOM object using multiple css classes</title>
<!-- PUT A PATH OF JQUERY LIBRARY -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
window.onload = function () {
var flag = true;
setInterval(function () {
if (flag) {
flag = false;
$("#spelling_game_score_box_score").addClass("active_score");
}
else {
flag = true;
$("#spelling_game_score_box_score").removeClass("active_score");
}
},2000);
}
</script>
<style>
#spelling_game_score_box_score {
position:absolute;
top:200px;
left:200px;
height: 100px;
width: 100px;
transform: rotate(-30deg);
-webkit-transform: rotate(-30deg);
-moz-transform: rotate(-30deg);
-ms-transform: rotate(-30deg);
font-size: 36px;
background-color: orange;
}
.active_score {
transform: scale(2);
-webkit-transform: scale(2);
-moz-transform: scale(2);
-ms-transform: scale(2);
}
</style>
</head>
<body>
<div id="spelling_game_score_box_score">100</div>
</body>
</html>
Now, I run the code I can not find scale() effect after interval of 2000 ms. But when I comment following css under #spelling_game_score_box_score selector
/*transform: rotate(-30deg);
-webkit-transform: rotate(-30deg);
-moz-transform: rotate(-30deg);
-ms-transform: rotate(-30deg);*/
I can have scale effect but can not find rotate effect.
I want to know that is there some sub properties for css tranform like border has border-color, border-style etc. so I can have some solution regarding the problem.
Please help me if you have some idea about it.
Thank you.