任何人都可以提出一種無需使用Flash或Silverlight等任何角度旋轉文字的方法。我想用相同角度的文字使用傾斜圖像。用Javascript旋轉文字
4
A
回答
3
0
4
這是一個有點晚了,但我已經寫了一些代碼來做到這一點。
http://jsfiddle.net/73DzT/139/
Object.prototype.rotate = function(d) {
var s = "rotate(" + d + "deg)";
if (this.style) { // regular DOM Object
this.style.MozTransform = s
this.style.WebkitTransform = s;
this.style.OTransform = s;
this.style.MSTransform = s;
this.style.transform = s;
} else if (this.css) { // JQuery Object
this.css("-moz-transform", s);
this.css("-webkit-transform", s);
this.css("-o-transform", s);
this.css("-ms-transform", s);
this.css("transform", s);
}
this.setAttribute("rotation", d);
}
可以與常規的對象或與對象的JQuery使用。並存儲一個名爲「旋轉」的屬性,爲您提供當前的旋轉值。
0
發現這個jQuery庫jQueryRotate這對我來說很好。請注意,即使名稱非常相似,鏈接的鏈接庫也不相同。
相關問題
- 1. JavaScript文本旋轉
- 2. 文字旋轉
- 3. 使用LESS旋轉文字
- 4. 文字旋轉libgdx
- 5. css3文字旋轉
- 6. 使用javascript旋轉
- 7. phantomjs - 文字變換旋轉扭曲文字旋轉
- 8. 使用JavaScript旋轉文檔標題
- 9. JavaScript旋轉
- 10. JavaScript旋轉IE8
- 11. 旋轉的文字和圖片在3D使用javascript
- 12. 如何旋轉Swing文字?
- 13. 如何旋轉文字?
- 14. 開羅的文字旋轉
- 15. 旋轉文字和圖像
- 16. 對齊旋轉文字
- 17. JavaFX 3D文字旋轉
- 18. div內的旋轉文字
- 19. iPhone:繪製旋轉文字?
- 20. 文字旋轉模糊
- 21. RichTextBox旋轉文字印刷
- 22. Javascript旋轉 - 如何逆時針旋轉?
- 23. 使用javascript旋轉圖像
- 24. 使用Javascript旋轉圖像
- 25. 使用Javascript旋轉圖像
- 26. 使用Renderscript繪製旋轉文字
- 27. 畫布旋轉 - JavaScript
- 28. javascript旋轉圖像
- 29. 旋轉javascript圖像
- 30. Javascript內容旋轉?
您需要支持哪些瀏覽器? – SLaks 2010-03-01 22:11:44
IE7 +,FF,Safari – CLiown 2010-03-01 22:16:45