html - 将 Dojo 样式应用于按钮时显示的两个按钮

标签 html css button dojo styles

当我将 DOJO 风格应用于按钮时,DOJO 风格的按钮会与一个小的普通按钮一起显示,谁能帮我解决这个问题。下面是完整的 HTML 代码。提前致谢。 enter image description here

<html>
<head>

<style type="text/css">
@import "http://o.aolcdn.com/dojo/1.2.0/dijit/themes/tundra/tundra.css";
</style>

<script>
    dojoConfig = {
        async : true,
        parseOnLoad : true
    }
</script>
<script
    src="http://ajax.googleapis.com/ajax/libs/dojo/1.9.2/dojo/dojo.js"
    data-dojo-config="async: true"></script>
<script>
    require([ "dojo/parser", "dijit/form/Button" ], function(parser) {
        parser.parse();
    });
</script>
</head>
<body class="tundra">
    <button dojoType="dijit.form.Button" type="button" />
    Greetings
    </button>
</body>

最佳答案

我在这里注意到两件事:

您要关闭按钮两次:

<button dojoType="dijit.form.Button" type="button" />
    Greetings
</button>

看看第一行的末尾,您正在结束 <button>使用 /> ,这意味着您也将关闭按钮。将其替换为:

<button dojoType="dijit.form.Button" type="button">
    Greetings
</button>

我注意到的第二件事是您正在加载旧版本的 Tundra 主题。您使用的是 Dojo 1.9.2,但您使用的是 1.2.0 的 Tundra 主题。尝试通过以下方式替换您的样式表:

http://ajax.googleapis.com/ajax/libs/dojo/1.9.2/dijit/themes/tundra/tundra.css

关于html - 将 Dojo 样式应用于按钮时显示的两个按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23707110/

相关文章:

html - 如何制作背景图像 "shine through"文字的字母

html - Google 字体大小 10.5 px (.5) 正确的方式和多浏览器支持

html - 社交媒体图标不会并排放置

python - Django:css 引用静态文件中的媒体(django dev/1.3/static 文件)

html - 在单个帖子页面 Wordpress 上居中 'the_post_thumbnail'

javascript - div 标签的独立动画事件

c# - 按钮文本属性中的下划线不显示

wpf - 仅将 WPF 样式应用于一个按钮

.net - 如何使单个事件处理程序处理ALL Button.Click事件?

javascript - jquery 下一个 div 元素选择