Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/fsharp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
F# Elmish应用程序:更改<;车身>;动态风格_F#_Elmish_Fable - Fatal编程技术网

F# Elmish应用程序:更改<;车身>;动态风格

F# Elmish应用程序:更改<;车身>;动态风格,f#,elmish,fable,F#,Elmish,Fable,版本 如何在elmish应用程序中更改身体样式?您可以通过Fable.Import.Browser模块访问Dom 试试看,例如 nuget Fable.Core ~> 3 nuget Fable.Elmish ~> 3 在1.3.0版中,它似乎是Browser.Dom.document而不是Browser.document。不管怎样,它是有效的!谢谢你的回答。 open Fable.Import Browser.document.body.style.fontSi

版本


如何在elmish应用程序中更改身体样式?

您可以通过
Fable.Import.Browser
模块访问Dom

试试看,例如

    nuget Fable.Core ~> 3
    nuget Fable.Elmish ~> 3

在1.3.0版中,它似乎是
Browser.Dom.document
而不是
Browser.document
。不管怎样,它是有效的!谢谢你的回答。
open Fable.Import

Browser.document.body.style.fontSize <- "20px"
Browser.document.body.classList.add("my-class")
Browser.document.body.classList.remove("my-class")