| 1 |
<?xml version="1.0" standalone="no"?> |
| 2 |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000802//EN" |
| 3 |
"http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.dtd"> |
| 4 |
|
| 5 |
<!-- |
| 6 |
|
| 7 |
Licensed to the Apache Software Foundation (ASF) under one or more |
| 8 |
contributor license agreements. See the NOTICE file distributed with |
| 9 |
this work for additional information regarding copyright ownership. |
| 10 |
The ASF licenses this file to You under the Apache License, Version 2.0 |
| 11 |
(the "License"); you may not use this file except in compliance with |
| 12 |
the License. You may obtain a copy of the License at |
| 13 |
|
| 14 |
http://www.apache.org/licenses/LICENSE-2.0 |
| 15 |
|
| 16 |
Unless required by applicable law or agreed to in writing, software |
| 17 |
distributed under the License is distributed on an "AS IS" BASIS, |
| 18 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 19 |
See the License for the specific language governing permissions and |
| 20 |
limitations under the License. |
| 21 |
|
| 22 |
--> |
| 23 |
<!-- ====================================================================== --> |
| 24 |
<!-- Modification of a rect's attributes --> |
| 25 |
<!-- --> |
| 26 |
<!-- @author [email protected] --> |
| 27 |
<!-- @version $Id$ --> |
| 28 |
<!-- ====================================================================== --> |
| 29 |
|
| 30 |
<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| 31 |
|
| 32 |
<svg id="body" width="450" height="500" viewBox="0 0 450 500"> |
| 33 |
<title>text CSS properties on 'onload'</title> |
| 34 |
|
| 35 |
<text x="50%" y="45" class="title">text CSS properties on 'onload'</text> |
| 36 |
|
| 37 |
<script type="text/ecmascript"><![CDATA[ |
| 38 |
function changeStyle(evt, newValue) { |
| 39 |
evt.target.setAttribute("style", newValue); |
| 40 |
} |
| 41 |
]]></script> |
| 42 |
|
| 43 |
<g id="test-content" style="font-size:18"> |
| 44 |
|
| 45 |
<text x="100" y="100" onload="changeStyle(evt, 'font-family:Impact')">font-family:Arial</text> |
| 46 |
<text x="100" y="140" onload="changeStyle(evt, 'font-size:32')">font-size:32</text> |
| 47 |
<text x="100" y="180" onload="changeStyle(evt, 'fill:crimson')">fill:crimson</text> |
| 48 |
<text x="100" y="220" onload="changeStyle(evt, 'stroke:orange;font-size:18')">stroke:orange; font-size:18</text> |
| 49 |
|
| 50 |
<text x="50%" y="260" onload="changeStyle(evt, 'text-anchor:start')">text-anchor:start</text> |
| 51 |
<text x="50%" y="300" onload="changeStyle(evt, 'text-anchor:middle')">text-anchor:middle</text> |
| 52 |
<text x="50%" y="340" onload="changeStyle(evt, 'text-anchor:end')">text-anchor:end</text> |
| 53 |
<text x="100" y="380" onload="changeStyle(evt, 'font-weight:bold')">font-weight:bold</text> |
| 54 |
<text x="100" y="420" onload="changeStyle(evt, 'font-style:italic')">font-style:italic</text> |
| 55 |
<text x="100" y="460" onload="changeStyle(evt, 'letter-spacing:10')">letter-spacing:10</text> |
| 56 |
|
| 57 |
</g> |
| 58 |
</svg> |