0
一个DIV或SPAN的宽度,我曾尝试这样做,但出成功(所有这些东西是jQuery中那么容易。arrrrr !!!)动画在道场
我曾尝试以下(和各种排列)但没有成功:
<body>
<span id="responseMsg" style="width:250px">Hi There</span>
</body>
JS:
dojo.animateProperty({
node: dojo.byId("responseMsg"), duration: 1000,
properties: {
backgroundColor: { start: "white", end: "#66CC00" }
}
}).play();
dojo.animateProperty({
node: dojo.byId("responseMsg"), duration: 1000,
properties: {
width: 0
}
}).play();
我已经摆弄起来here所以你可以看到我的意思。 (我猜dojo动画CSS属性不是变量)
运行完美。添加'white-space:nowrap;'并且文本在合同时不会折叠。你知道为什么文本在div之外是可见的吗? – Sevenearths 2013-02-17 13:17:40
是的,只需在您的CSS规则中添加“overflow:hidden”,并在调整大小时剪切文本。 – Raoul 2013-02-17 13:19:45
完美!非常感谢 – Sevenearths 2013-02-17 13:31:45