有没有办法用css / jquery获得非常宽但细的花括号?简单地缩放div也会缩放线宽,因此当太大时,牙套变得难看. div id="braces" style="font-size:20px;"{/div$("#braces").css({ "transform" : "scale(4,25)"}); 这段
<div id="braces" style="font-size:20px;">{</div> $("#braces").css({ "transform" : "scale(4,25)" });
这段代码给了我非常大而窄的花括号,但是我想要非常薄的括号,只有“手臂”变得更长.
有谁知道如何实现这一目标?
我最终使用的解决方案是 http://jsfiddle.net/q9Bcb/69/var height = canvas.height; var space = 5; var radius = 7; var linelength = height / 2; context.lineWidth = 4; context.beginPath(); context.moveTo(20+radius, space); context.arcTo(20, space, 20, space+radius, radius); context.lineTo(20, linelength - radius); context.arcTo(20, linelength, 20 - radius, linelength, radius); context.arcTo(20, linelength, 20, linelength + radius, radius); context.lineTo(20, height - space - radius); context.arcTo(20, height - space, 20 + radius, height - space, radius); context.stroke();