我试图在<canvas>
标签内淡化DIV。 (这是甚至允许的?我假设,因为它是一个元素)。你知道标准jQuery fadeIn,这里是我使用的风格是什么:jQuery淡化画布内的div
<style type="text/css">
<!--
#canvas {
background:red;
z-index:0;
position:relative;
}
.txt {
z-index:2;
background:blue;
display:none;
position:absolute;
top:0;
right:0;
width:200px;
}
-->
</style>
和足够简单,这里是我的HTML(忽略身体。我拥有这一切..这是剪短):
<body>
<canvas id="canvas"><div class="txt">Welcome to the Game</div></canvas>
</body>
我想一个简单的淡入和它不工作..
你有jQuery代码吗? – locoboy 2012-04-22 22:47:02
为什么它需要在canvas元素中 – Esailija 2012-04-22 22:47:47
这里是jQuery'$('。txt')。fadeIn('fast',function(){});'...它必须在里面..如果不是,它将无法工作? – nn2 2012-04-22 22:49:59