如何通过CSS3动态生成这样的形状:
忽略边框,重要的方面包括:
- The gradient in the arrow body, and that the gradient lasts from the tip to the end of the arrow.
- The length of the square part will vary.
我尝试了正常的
:after
方法将三角形添加到 div
元素的末尾,但无法正确地让渐变跨越尖端和主体部分。示例: http://jsfiddle.net/rtuY9/8/