[ This is a follow up from my earlier question Very wide thin curly braces with css or jquery ]
Here is a fiddle drawing curly braces: http://jsfiddle.net/q9Bcb/7/
var canvas = document.getElementById('myCanvas');
var context = canvas.getContext('2d');
var y = canvas.height;
var linelength = ( y - 60 ) / 2;
context.lineWidth = 4;
context.beginPath();
context.moveTo(27,10);
context.arcTo(20,10,20,20,7);
context.lineTo(20,20+linelength);
context.arcTo(20,30+linelength,0,30+linelength,7);
context.arcTo(20,30+linelength,20,40+linelength,7);
context.lineTo(20,y-20);
context.arcTo(20,y-10,30,y-10,7);
context.stroke();
Is there a simpler/nicer way to obtain that ?
It's not entirely clear to me, but I assume this is the effect you're going for:
How about this: jsFiddle
HTML:
JS:
CSS: