Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はdivの回転範囲を90度から-90度に制限しようとしています。div は、定義している範囲を超えてはなりません。このフィドルhttp://jsfiddle.net/aniprasanth/Cc6cr/1/を検討してください。前もって感謝します
あなたの jsfiddle では、角度の値がすでにわかっているので、CSS トランスフォーム プロパティを変更する前に、回転が定義した範囲内に収まるかどうかを確認することができます。
if(degree < 90 && degree > -90) { // css transform changes }
これは、-90 度から 90 度の間の回転のみを適用します。