{"json_modified": "2016-06-28T23:21:43.186569", "uuid": "bd1646cc-9ab7-4d5c-a1cb-ae9ff27b53c5", "title": "CanvasGradient.addColorStop()", "url": "/en-US/docs/Web/API/CanvasGradient/addColorStop", "tags": ["Canvas", "API", "Reference", "Gradients", "CanvasGradient", "R\u00e9f\u00e9rence", "canvas", "Method"], "translations": [{"uuid": "4f62b574-bb45-49a9-a4d0-b88fdfa75bf2", "title": "CanvasGradient.addColorStop()", "url": "/zh-CN/docs/Web/API/CanvasGradient/addColorStop", "tags": [], "summary": "CanvasGradient.addColorStop() \u65b9\u6cd5\u6dfb\u52a0\u4e00\u4e2a\u7531\u504f\u79fb\u503c\u548c\u989c\u8272\u503c\u6307\u5b9a\u7684\u65ad\u70b9\u5230\u6e10\u53d8\u3002\u5982\u679c\u504f\u79fb\u503c\u4e0d\u57280\u52301\u4e4b\u95f4\uff0c\u5c06\u629b\u51faINDEX_SIZE_ERR\u9519\u8bef\uff0c\u5982\u679c\u989c\u8272\u503c\u4e0d\u80fd\u88ab\u89e3\u6790\u4e3a\u6709\u6548\u7684CSS\u989c\u8272\u503c <color>\uff0c\u5c06\u629b\u51faSYNTAX_ERR\u9519\u8bef\u3002", "localization_tags": [], "locale": "zh-CN", "last_edit": "2016-06-28T23:21:37", "review_tags": []}], "modified": "2016-06-28T06:50:21", "label": "CanvasGradient.addColorStop()", "localization_tags": [], "locale": "en-US", "id": 128729, "last_edit": "2016-06-28T06:50:17", "summary": "The CanvasGradient.addColorStop() method adds a new stop, defined by an offset and a color, to the gradient. If the offset is not between 0 and 1, an INDEX_SIZE_ERR is raised, if the color can't be parsed as a CSS <color>, a SYNTAX_ERR is raised.", "sections": [{"id": "Quick_Links", "title": null}, {"id": "Syntax", "title": "Syntax"}, {"id": "Parameters", "title": "Parameters"}, {"id": "Examples", "title": "Examples"}, {"id": "Using_the_addColorStop_method", "title": "Using the "}, {"id": "HTML", "title": "HTML"}, {"id": "JavaScript", "title": "JavaScript"}, {"id": "Playable_code", "title": "Playable code"}, {"id": "Specifications", "title": "Specifications"}, {"id": "Browser_compatibility", "title": "Browser compatibility"}, {"id": "See_also", "title": "See also"}], "slug": "Web/API/CanvasGradient/addColorStop", "review_tags": []}