| <?xml version="1.0" standalone="no"?> |
| <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000802//EN" |
| "http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.dtd"> |
| |
| <!-- |
| |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
| --> |
| <!-- ====================================================================== --> |
| <!-- Modification of a rect's attributes --> |
| <!-- --> |
| <!-- @author tkormann@ilog.fr --> |
| <!-- @version $Id$ --> |
| <!-- ====================================================================== --> |
| |
| <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| |
| <svg id="body" width="450" height="500" viewBox="0 0 450 500"> |
| <title>text CSS properties on 'onload'</title> |
| |
| <text x="50%" y="45" class="title">text CSS properties on 'onload'</text> |
| |
| <script type="text/ecmascript"><![CDATA[ |
| function changeStyle(evt, newValue) { |
| evt.target.setAttribute("style", newValue); |
| } |
| ]]></script> |
| |
| <g id="test-content" style="font-size:18"> |
| |
| <text x="100" y="100" onload="changeStyle(evt, 'font-family:Impact')">font-family:Arial</text> |
| <text x="100" y="140" onload="changeStyle(evt, 'font-size:32')">font-size:32</text> |
| <text x="100" y="180" onload="changeStyle(evt, 'fill:crimson')">fill:crimson</text> |
| <text x="100" y="220" onload="changeStyle(evt, 'stroke:orange;font-size:18')">stroke:orange; font-size:18</text> |
| |
| <text x="50%" y="260" onload="changeStyle(evt, 'text-anchor:start')">text-anchor:start</text> |
| <text x="50%" y="300" onload="changeStyle(evt, 'text-anchor:middle')">text-anchor:middle</text> |
| <text x="50%" y="340" onload="changeStyle(evt, 'text-anchor:end')">text-anchor:end</text> |
| <text x="100" y="380" onload="changeStyle(evt, 'font-weight:bold')">font-weight:bold</text> |
| <text x="100" y="420" onload="changeStyle(evt, 'font-style:italic')">font-style:italic</text> |
| <text x="100" y="460" onload="changeStyle(evt, 'letter-spacing:10')">letter-spacing:10</text> |
| |
| </g> |
| </svg> |