dojo中的dgrid注意事项,每行的高度问题

前端之家收集整理的这篇文章主要介绍了dojo中的dgrid注意事项,每行的高度问题前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

dgrid真坑!也怪自己没认真看文档。

我只是做一个小的grid实验,但是每一行的高度都是100%,气死我了!

后来仔细找了下文档,无意中试了一下,竟然成功了,这里分享一下。

问题:dgrid每一行都是100%的高度,如图:

但是我要的是这样:

解决办法:

注意一下你的html中的最上面那句话

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

应该改成这样:
<!DOCTYPE HTML>
这下就可以了。

下面引用官方文档的文字

</pre>文档在在dgrid的github中,注意下面的“<!DOCTYPE html>”<pre name="code" class="html">Browser and Dojo Version Support

dgrid 0.4 works with Dojo 1.8 or higher,and supports the following browsers:

    IE 8+
    Firefox latest + ESR
    Chrome latest (desktop and mobile)
    Safari latest (desktop and mobile)
    Opera latest

dgrid 0.4 does not support quirks mode. You are heavily encouraged to include the HTML5 DOCTYPE (<span style="color:#FF0000;"><!DOCTYPE html></span>) at the beginning of your pages.
原文链接:https://www.f2er.com/dojo/291046.html

猜你在找的Dojo相关文章