Using CSS styles: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<html> | <html> | ||
<style type="text/css"> | <style type="text/css"> | ||
. | .myFont { | ||
font-family: "Avant Garde", Avantgarde, "Century Gothic", CenturyGothic, "AppleGothic", sans-serif; | font-family: "Avant Garde", Avantgarde, "Century Gothic", CenturyGothic, "AppleGothic", sans-serif; | ||
border: 1px solid black; | border: 1px solid black; | ||
padding: 5px; | padding: 5px; | ||
border-radius:5px; | border-radius:5px; | ||
} | } | ||
.myFontHigh { | |||
font-family: "Avant Garde", Avantgarde, "Century Gothic", CenturyGothic, "AppleGothic", sans-serif; | |||
border: 1px solid black; | |||
padding: 5px; | |||
border-radius:5px; | |||
font-size:150%; | |||
} | |||
.mySerifFont { | .mySerifFont { | ||
Line 18: | Line 26: | ||
var board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-5,5,5,-5]}); | var board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-5,5,5,-5]}); | ||
var txt = board.create('text', [1,2, "Hello world"], {cssClass:' | var txt = board.create('text', [1,2, "Hello world"], | ||
{ | |||
cssClass:'myFont', strokeColor:'red', | |||
highlightCssClass: 'myFontHigh' | |||
}); | |||
</jsxgraph> | </jsxgraph> |
Revision as of 09:05, 10 October 2012