$('#btn').click(function() {
// Changed to make demo smoother.
$('#container').toggleClass('rotated');
});
#container {
/* Resized so it looks better in snippet */
width: 300px;
height: 300px;
/* So you can see what's going on */
border: 1px solid black;
/* Changed to make it transparent, otherwise you may cover other elements */
background: rgba(0,0,0,0);
/* So any elements underneath can still receive events */
pointer-events: none;
/* Moved here from svg */
transition: all 1.5s ease;
}
/* Added */
#container.rotated {
transform: rotate(45deg);
}
#btn {
padding: 10px;
color: #fff;
text-align: center;
background: green;
}
.cls-1 {
fill: #2bffaa;
}
.cls-2 {
fill: #ccc;
}
.cls-3 {
fill: #f2f2f2;
}
.cls-4 {
fill: #ddd;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="btn">GO</div>
<div id="container">
<svg id="scroller" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 480 480">
<title>demo</title>
<path id="scroller__outer" class="cls-1" d="M240,147a92.93,92.93,0,0,0-28.29,4.39l5.14,12A80.1,80.1,0,1,1,179.23,188L132.31,226.4c13.11,3.06,15.18,4.06,15.18,4.06S147,236.78,147,240A93,93,0,1,0,240,147Z" />
<path id="scroller__inner" class="cls-2" d="M240,158a84.78,84.78,0,0,0-23.82,3.86l1.76,4.13,6.59,15,0.68,1.44A59.46,59.46,0,1,1,190.56,207l-0.92-1.44-9.17-15.41L179.23,188c-12,14-21.22,32.14-21.22,52,0,44.18,37.82,82,82,82s82-37.82,82-82S284.18,158,240,158Z"
/>
<circle id="scroll__inner__circle" class="cls-3" cx="240" cy="240" r="51.5" />
<path id="scroll__inner__outline" class="cls-4" d="M240,179a61,61,0,1,0,61,61A61,61,0,0,0,240,179Zm0,117a56,56,0,1,1,56-56A56,56,0,0,1,240,296Z" />
</svg>
</div>
IEのバージョンはターゲットですか? http://caniuse.com/#search=transform –
私は11+と言うでしょう。そしてこのページはIE 11でサポートされていると言っていますが、私にとってはうまくいきません。それはIE 11.0.9600.18376のIMです。それでどうしてうまくいかないの? –