आप सीमा के बारे में पूरा नियंत्रण एक घ ढाल चाहते हैं, आप मेरी iQuery पृष्ठभूमि कैनवास प्लगइन का उपयोग कर सकते हैं। यह एक HTML5 कैनवास तत्व के साथ काम करता है और किसी भी भिन्नता में सीमाओं और पृष्ठभूमि को आकर्षित करने की अनुमति देता है। लेकिन आपको जावास्क्रिप्ट
प्रोग्राम करने में सक्षम होना चाहिए यह पृष्ठभूमि ढाल और गोलाकार कोनों के साथ एक पूर्ण विशेषीकृत नमूना है। जैसा कि आप देख सकते हैं, चित्र पूरी तरह से जावास्क्रिप्ट में किया जाता है, आप अपने इच्छित पैरामीटर को सेट कर सकते हैं। ड्राइंग प्रत्येक आकार (आकार बदलने के कारण) पर फिर से शुरू की जाती है, आप पृष्ठभूमि चित्र को अनुकूलित कर सकते हैं ताकि आप इस विशिष्ट आकार पर इच्छित वाट को दिखा सकें।
$(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
स्रोत
2009-09-06 07:15:50
लिंक टूटा हुआ प्रतीत होता है। क्या यह सही यूआरएल है: http://ragamo.medioclick.com/jquery/corners/? – Manu
अब यह दिखाई देगा कि दोनों लिंक टूटा हुआ है। यह defacto होना चाहिए: http://plugins.jquery.com/project/jquery-roundcorners-canvas – T3db0t