Closed tiansiyuan closed 1 year ago
For a better manner using HVML, if you want to change the style according to something like the current system language, you can use the following code:
<hvml target="html" lang="$STR.substr($SYS.locale, 0, 2)" silently > <head> <base href=$CRTN.base(! "file://$SYS.cwd" ) hvml:silently /> <link rel="stylesheet" type="text/css" href="hvml/assets/fibonacci-html-temp-{$STR.substr($SYS.locale, 0, 2)}.css" /> ... </head> ... </hvml>
Then in the CSS file Source/Samples/hvml/assets/fibonacci-html-temp-zh.css, define the style sheet for the element:
Source/Samples/hvml/assets/fibonacci-html-temp-zh.css
ol { list-style-type:cjk-decimal; }
Do not forget the change the file CMakefiile.txt under Source/Samples/hvml to add the new asset file.
CMakefiile.txt
Source/Samples/hvml
Many thanks!
For a better manner using HVML, if you want to change the style according to something like the current system language, you can use the following code:
Then in the CSS file
Source/Samples/hvml/assets/fibonacci-html-temp-zh.css
, define the style sheet for the element:Do not forget the change the file
CMakefiile.txt
underSource/Samples/hvml
to add the new asset file.