14
A
回答
9
它處理邊框,讓事情的大小相同,其實你要墊了一下,從有文字住守在摺痕處。它相當快,除非你在ie 6. 同樣漂亮的其他角包的語法,但只是更漂亮一般。
編輯以添加新的鏈接jQuery Roundcorners Canvas
11
$(this).corner();
7
的jQuery UI的主題化API來完成這在Firefox中是「Corner Radius Helpers」的方式。
這裏是他們的樣子在在我的UI的副本捆綁在一起的CSS:
/* Corner radius */
.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; }
.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; }
.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; }
.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; }
.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; }
.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; }
.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; }
.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; }
.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; }
不幸的是,這似乎並沒有在IE7任何效應,因爲該職位。
在jQuery代碼,這些類的一個可能的方式是這樣的應用:
$('#SomeElementID').addClass("ui-corner-all");
0
如果您想了解邊境完全控制的d梯度,你可以用我的IQUERY背景畫布插件。它可以與HTML5 Canvas元素協同工作,並允許在任何變化中繪製邊框和背景。但你應該可以編程JavaScript
這是一個帶有背景漸變和圓角的全功能示例。如你所見,繪圖完全用JavaScript完成,你可以設置你想要的每個參數。 圖形在每個調整大小(由於調整大小事件)重做,您可以調整背景圖形顯示在這個特定的大小你想要的。
$(document).ready(function(){
$(".Test").backgroundCanvas();
});
function DrawBackground() {
$(".Test").backgroundCanvasPaint(TestBackgroundPaintFkt);
}
// Draw the background on load and resize
$(window).load(function() { DrawBackground(); });
$(window).resize(function() { DrawBackground(); });
function TestBackgroundPaintFkt(context, width, height, elementInfo){
var options = {x:0, height: height, width: width, radius:14, border: 0 };
// Draw the red border rectangle
context.fillStyle = "#FF0000";
$.canvasPaint.roundedRect(context,options);
// Draw the gradient filled inner rectangle
var backgroundGradient = context.createLinearGradient(0, 0, 0, height - 10);
backgroundGradient.addColorStop(0 ,'#AAAAFF');
backgroundGradient.addColorStop(1, '#AAFFAA');
options.border = 5;
context.fillStyle = backgroundGradient;
$.canvasPaint.roundedRect(context,options);
}
這裏是插件,而這個網站讓廣大使用它: jQuery Background Canvas Plugin
相關問題
- 1. JQuery - 圓角
- 2. 與外圓角
- 3. 圓角與Access
- 4. 使用圓角與jquery在ie
- 5. asp.net菜單項與jquery圓角
- 6. jquery更改圓角
- 7. DIV與圓角和尖角
- 8. 圓角圓角?
- 9. 圓角桌與LESS
- 10. 與反向圓角
- 11. box2d圓體卡在角落
- 12. 倒三角倒角與圓角
- 13. 頂圓角在我的jQuery
- 14. 帶菜單的JQuery圓角
- 15. jQuery的圓角IE問題
- 16. 造型jQuery ThickBox(圓角)
- 17. 圓角IE:VML VS jQuery的
- 18. 圓角與CSS的梯形
- 19. 與路徑圓頂角
- 20. 與html表格圓角
- 21. 圓角問題與IE
- 22. 圓角與背景顏色
- 23. 需要uiimageview圓角的流暢動畫
- 24. 圓角DataGrid角?
- 25. 驗證流星窗體提交與jquery
- 26. WPF:帶圓角的3D立方體
- 27. 三維立方體的圓角邊緣
- 28. 使立方體變成圓角
- 29. Box2D的矩形體具有圓角
- 30. 圓角
只是嘗試這樣做。在5分鐘內啓動並運行!我喜歡這個的原因是它缺乏對任何其他庫/插件的依賴。 – 2009-08-06 18:04:29
最新版本可以在這裏找到:http://www.malsup.com/jquery/corner/ – 2010-05-13 13:14:17