【发布时间】:2016-02-03 09:08:12
【问题描述】:
我遇到了一个我无法解决的奇怪问题。我正在尝试编写一个矩形反应组件,其中一个 Box-Gradient 是一个选项。
但是我的四个三角形之间有一个间隙,我尝试用它(包括使用高斯模糊)来缩小差距,但我似乎无法在不导致角落混乱的情况下缩小差距。
<html style="margin:0;padding:0;height:100%;width:100%;">
<head>
</head>
<body style="margin:0;padding:0;height:100%;width:100%;">
<svg height=0 width=0>
<defs>
<linearGradient id="lickMy" x1="0%" y1="0%" x2="100%" y2="0%">
<stop offset="0%" style="stop-color:rgb(125,125,125);stop-opacity:1" />
<stop offset="0%" style="stop-color:rgb(0,0,0);stop-opacity:1" />
<stop offset="100%" style="stop-color:rgb(0,0,0);stop-opacity:1" />
</linearGradient>
<filter id="balls">
<feGaussianBlur stdDeviation="1" />
</filter>
</defs>
</svg>
<svg height=100% width=100% >
<rect width="100%" height="100%" fill="rgb(125,125,125)"></rect>
<circle cx="100" cy="100" r="40" fill="white" />
<g transform="translate(50,50)" >
<g>
<polygon points="0,0 0,100 50,50" fill="url(#lickMy)" stroke-width:"0" />
</g>
<g transform="rotate(90,50,50)">
<polygon points="0,0 0,100 50,50" fill="url(#lickMy)" stroke-width:"0" />
</g>
<g transform="rotate(180,50,50)">
<polygon points="0,0 0,100 50,50" fill="url(#lickMy)" stroke-width:"0" />
</g>
<g transform="rotate(-90,50,50)">
<polygon points="0,0 0,100 50,50" fill="url(#lickMy)" stroke-width:"0" />
</g>
</g>
</svg>
</body>
</html>
【问题讨论】: