从CDN加载Dojo dijit CSS

Nee*_*asu 31 dojo

我对道场世界很新.使用dojo和谷歌的CDN很好.但是在使用dijit时,dojo.require()不起作用.哪里可以找到CDN的默认CSS主题?

和quorisity的另一个问题:dijit的CSS配置是否也适用于dojox?

Bri*_*air 39

CSS可以在Google的CDN上找到.我在一两页中使用过它.这是一些CSS链接标记.

<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/resources/dojo.css"> 
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dijit/themes/tundra/tundra.css"> 
Run Code Online (Sandbox Code Playgroud)

与库类似,您可以在URL中选择或多或少的特定版本,因此这将获取1.4.x链中的最新版本.

更新[19/May/2016]: -

更新版本 - 1.10.4

<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/resources/dojo.css"> 
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.10.4/dijit/themes/tundra/tundra.css"> 
Run Code Online (Sandbox Code Playgroud)

  • 这个帖子在谷歌这个问题上非常高,所以我也添加了1.8版本:`<link rel ="stylesheet"type ="text/css"href ="http://ajax.googleapis.com/ajax/库/道场/ 1.8 /的dijit /主题/克拉罗/ claro.css"/>` (8认同)
  • 文件夹结构适用于1.6.1`http:// ajax.googleapis.com/ajax/libs/dojo/1.6.1/dijit/themes/claro/claro.css` (3认同)